[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: grep | sed do not function inline?



On 2007-04-23, Greg Folkert <greg@gregfolkert.net> wrote:
>
> Tyler, look at what "tail -f" it means (basically):
>
>         -f, --follow[=3D{name|descriptor}]
>             output appended data as the file grows; -f, --follow, and
>             --follow=3Ddescriptor are equivalent
>
> Which mean it will sit watching the file/file-descriptor for appended
> output and stay attached "forever" until broken out of.
>
> I've used it for years as part of my "watch for certain things in the
> logs" scripts.

Yes, I was mistaken. I hadn't seen the -f flag before, and assumed it
was just an explicit way to designate the input file, the way it is
used in sed or awk. Of course, sed and awk use -f to specify the
program file, not the input file, so that comparison wasn't that good
to start with.

How do you actually run tail with -f? Do you just let it go in it's
own xterm and periodically check to see if it has spit out anything
of concern? Or can you use it in a terminal you're using for other
tasks as a background process? Sounds useful, but I'm not sure exactly
how you'd operate it...

Tyler



Reply to: