I am learning to use grep and I tried to use the following commands to find entries in /var/log/messages
file, but I get errors:
grep "Oct 23 21:22:44" | "80" /var/log/messages
I get error for this. Than I tried the following and replaced double quotes with single quotes:
grep 'Oct 23 21:22:44' | '80' /var/log/messages
This did not work either. Why is it wrong because we can search multiple patterns using pipe! Is it because Oct 23 21:22:44 and 80 are in different places!
80 and the date are in different orders in the file!