Вопрос

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