Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2007 16:55:45 -0700
From:      James Harrison <jamesh@lanl.gov>
To:        "Mikhail T." <mi@aldan.algebra.com>
Cc:        questions@freebsd.org
Subject:   Re: tail does not exit
Message-ID:  <1198108545.6721.5.camel@p25dual1.lanl.gov>
In-Reply-To: <200712192322.lBJNMfps053071@aldan.algebra.com>
References:  <200712192322.lBJNMfps053071@aldan.algebra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1198108545.6721.5.camel>