|
try using
tail -f log_X | grep n >> log_Y
I'm not sure this would work...
I can add that the commands on either side of a pipe "|" are started and executed synchronously... and we know that any command like grep will finish only if it sees an EOF, which "tail -f" will not give as it is in an infinite loop looking for newly appended lines...
so...
tail -f log_X | grep n
should be working fine and giving "new" lines having "n" to stdout as and when they append to log_x...
It may be a problem with redirection, so use redirection in append mode >> and let us know!!
Cheers!
Vishnu.
|