From: Michael W. <mw...@ai...> - 2005-03-14 23:21:41
|
Yes..since perl allows the same functions to be executed in one file, and you can do "process" management automagically. I understood that you were using shell scripts. I think perl's REGEX engine will a.) process faster than awk, b.) given it's got perl around it, it makes it easier to manipulate the data. I wrote my first perl script based on some similar reason for watching processes and tailing the logfiles....for the same reasons you quote as being not so nice to deal with...too many processes left hanging around. (That, and I found awk to be awkward, but a bit better than sed.) ;) On Monday 14 March 2005 11:32 am, William Arlofski wrote: > Michael Wray wrote: > > Yes, use a perl script to accomplish the same thing....i.e. embed the > > functionality into your CGI...and use a forked process to tail the file > > and display it. See the Perl Cookbook.... > > Hi Michael... Just so we are on the same page and that I understand you, > I'd like to clarify that I have not written any CGI in this example. The > "run.cgi" that is shown below in the output of the ps axf command is > Webmin's built-in Custom Commands cgi. That CGI calls my bash script > which does the tailing. > > >>/usr/bin/perl /usr/local/webmin-1.150/miniserv.pl ... > >> \_ /usr/local/webmin-1.150/custom/run.cgi > >> > >> | \_ /bin/bash /path/to/script/taillog.sh > >> | \_ tail -n0 -f /path/to/log/file/logonlog.log > >> | \_ awk BEGIN { FS="\t" (rest of script here) > > Are you saying that instead of a shell script, I should re-write it as a > perl script with the same funtionality? (plus the forked process you > mentioned) > > Thanks... > > - > Bill Arlofski > Reverse Polarity > waa...@re... > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > - > Forwarded by the Webmin mailing list at web...@li... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-list |