On 4 Mar 1998, Ben Pfaff wrote: > How can you 'watch' a file as it is being written to? For example, I want > to have a script watch a log files for certain information and do > something when it sees the information. > > Depending on exactly what you mean, `tail -f' might be helpful. >
hmmm.. if 'tail -f filename' continuously outputs using stdout, how could I stop it when the text I'm looking for appears? I want tail to terminate when it receives the following information: caller=##########, conn='', name='username' ..and put those strings in variables for another program to use. tail -f /var/log/mgetty/mg_ttyS1.log | ( ??? ) Thanks -Paul -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .