Actively Monitoring Log File
I have an application which generate logs like this
Code:
2011-05-17 13:21:27 - Msg 2402 say if [ $5 -gt 0 || $6 -gt 0 ]; then <send email> |
no one knows? :/
|
Take a look at some code that I wrote. this would give you the if then part.
Code:
if [ $? -eq 0 ]; then # check the exit code |
Code:
# tail -f logfile | grep "house server (def" | awk '{ |
I'd try more like
Code:
tail -f logfile | grep "house Server" |awk '{print $5 $6}' Also, *nix is case sensitive, so 'server' != 'Server'. HTH |
nope still not working..
ps: i was just using it for testing purpose as if i can get the argument, then i can manipulate them which is why i used "server" instead of "Server" |
Prove to yourself you have a record to print ...
|
All times are GMT -5. The time now is 10:20 PM. |