I am not that much familiar with Linux and Unix, but I find these commands so helpful when you parse the logs.
To do a logical OR, you can use one of the following commands:
grep -i -E "Var1|Var2" FILENAME
awk '/Var1/ || /Var2/' FILENAME
To do a logical AND, you can use the following command:
grep VAR1 FILENAME | grep VAR2 | grep VAR3
awk '/Var1/ && /Var2/' FILENAME
No comments:
Post a Comment