Hi all!
I have a problem with line command. The aim is to write each line of stdin into a text file.
For example with this command:
$find /
/usr/share/zoneinfo/WET
/usr/share/zoneinfo/Zulu
/usr/share/zoneinfo/iso3166.tab
/usr/share/zoneinfo/localtime
/usr/share/zoneinfo/zone.tab
/usr/src
/initrd.img
/vmlinuz
I want to write in a file the always the last line printed to stdin, to real-time follow proces execution.
I tried this:
$find / | line > stdout.file (no results, only write the first line and exit)
$find / | tail -f -n 1 > stdout.file (no results, only write the last line and exit)
Any ideas?
Thank you very much