سؤال

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?

هل كانت مفيدة؟

المحلول

..... | tail -1 | cut -f 1 | xargs -i sed -n '{},$p' your_file
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top