tail does not exit
James Harrison
jamesh at lanl.gov
Wed Dec 19 15:55:57 PST 2007
On Wed, 2007-12-19 at 18:22 -0500, Mikhail T. wrote:
> #!/bin/sh
>
> if tail -f /var/log/messages | awk '{print "Exiting"; exit 0}'
> then
> echo Exited
> else
> echo Failed
> fi
>
> exit 0
I assume it has something to do with tail -f being used, rather than
tail. Is there a reason you want the -f flag?
tail -f holds on for dear life until a ctrl-c happens. IT HAS A DEATH
GRIP!
James
More information about the freebsd-questions
mailing list