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

 

     Re: [nocol-users] webnocol.cgi

Both variations *should* work.  The way you've specified it here,
however will tail the last x lines of the file and *then* do a grep
which may yield only one or two results.  The way he had it before
would've yielded x lines of grep output every time, which IMHO would
be better as it would give more informaiton.

On Fri, 18 Dec 1998, Dirk
Baetjer wrote:

> Hi Alan,
> 
> 
> tail is a program to visualize the last part of a file. If you want to 
> filter the output, you have to use it in this way:
> 
> local ($tail) = "/usr/bin/tail /var/log/datalog| /usr/bin/grep 
> DEVICE";
> 
> It has nothing to do with Perl... :-)
> 
> 
> By the way: tail produces continous output. If you only want to see 
> problems in the past, use cat instead.
> 
> Bye,
> 
> Dirk
> 
> 
> >>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<
> 
> Am 18.12.98, 08:08:54, schrieb Alan Halachmi <alan@halachmi.net> zum 
> Thema [nocol-users] webnocol.cgi:
> 
> 
> > Quick question...
> 
> >       I'm no PERL wizard, so I'm in need of some help.  I
> > added another command to the troubleshooting area of webnocol.
> > When I had the webnocol.cgi line read:
> > local ($tail) = "tail /var/log/datalog";
> > everything worked fine.
> 
> > However, when I changed it to:
> > local ($tail) = "/usr/bin/grep DEVICE /var/log/datalog | 
> /usr/bin/tail";
> > it no longer works.
> 
> > I tried:
> > local ($tail) = "/usr/bin/grep DEVICE /var/log/datalog"
> > but that didn't work either.
> 
> > I'd like to be able to take a site, grep it from the datalog file and 
> tail the output of the grep, but I'm not having any luck.
> 
> > Ideas?
> 
> > TIA,
> > Alan
> 
> > --
> > Alan Halachmi
> > Wide Area Networks Specialist
> > Ingram Entertainment Network Services
> > mailto:alan@halachmi.net
> > http://www.ingramentertainment.com
> 
> 
> 

Thank you,

Jonathan A. Zdziarski
Sr. Systems Administrator
Netrail, inc. 
888.NET.RAIL x240