Reputation: 875
Need to check in the error log on UNIX server for multiple sites, ex. lets say there are 3 sites ABC.com, XYZ.com and OPQ.com. i want to get error log from server for any of these sites lies.
I tried with
tail -99999 /apache/log/error_log| grep 'ABC | XYZ | OPQ'
But was not working..
Upvotes: 1
Views: 470
Reputation: 5806
tail -99999 /apache/log/error_log| grep -E '(ABC|XYZ|OPQ)'
or
tail -99999 /apache/log/error_log| grep -e ABC -e XYZ -e OPQ
Upvotes: 3
Reputation: 936
Just use egrep:
tail -99999 /apache/log/error_log| egrep '(ABC|XYZ|OPQ)'
Upvotes: 1