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?

Était-ce utile?

La solution

..... | tail -1 | cut -f 1 | xargs -i sed -n '{},$p' your_file
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top