using tail -f
Working in HP-UX 10.20. I eventually want to write a bourne shell script to handle the following problem, but for now I am just toying with it at the command line.
Here's what I am basically trying to do:
tail -f log_X | grep n > log_Y
I am doing a tail -f on log_X . Once it sees "n", I would like for it to grep it, then put it into log_Y. It ain't making it to log_Y.
I have been manually adding "n" to log_X, and the tail command is definitely seeing it, but it fails to pass it to log_Y.
Why? Is it because the command is trying to "complete" the tail -f before it executes the > (redirect) to log_Y??
Is there a better way to appraoch this?
TYIA
|