waiting for response,
Perl12
If all the log files are in the same directory, go to the directory and type in:
find . -type f -print0 ¦ xargs -0 grep -E 'error¦warning'
Since this is a perl forum, here's a way to do it with find and perl:
find . -type f -print0 ¦ xargs -0 perl -ne 'print if /error¦warning/'
If i try to make a script of it i get this message ----syntax error at .//myscript.pl line 3, near "-ne"
Execution of .//myscript.pl aborted due to compilation errors.
My script is simple & it goes loke this
#! /usr/atria/bin/Perl
find . -type f -print ¦ xargs perl -ne 'print if /error¦warning/'
pls do let me know why I am not able to put in in the script form
waiting for response..
perl12