Question

I have a piped unix script which finally yields a line number to me in the subject file.
Now,I need to print out the file contents from this particular line to the end.
Is it possible to feed the line number to sed via xargs,for sed to print out the desired.

.....|tail -1 | cut -f 1 | xargs sed ...?

Is this possible?

Was it helpful?

Solution

..... | tail -1 | cut -f 1 | xargs -i sed -n '{},$p' your_file
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top