How to build a script that will search for a specific word in a log file
Hello everybody,
I am a new user and pretty new at Linux.
I am looking for a script that i will enter him a path for LOG file, on this log file he will search for about 50-100 error codes that i will configure in the script.
And in the end it will output me the error codes that were find on the log file
And this script needs to be run on real time when log is updated (Shift+F)
For example:
code=202
code=205
code=300
code=122
script runs log file, ending output:
The code that were found are:
code=202
code=205
meaning, these are the codes that were found.
I hope its clear and understandable i have read a little bit on grap commend and tried to find information without success.
Thanks a lot.
Last edited by kimbo8; 03-27-2012 at 04:59 AM.
|