Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to give two different regular expressions in a Grep command?

I am trying to search message logs from CLI. My search query which involves a regular expression is giving thousands of results. We need to further filter the results using another regular expression. Please let me know if we can put two regular expressions in the search query.

 

Below is how I use grep command: Can I use multiple regular expression separated by a "|" (pipe) symbol

Enter the regular expression to grep.
[]> MID 123456

 

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

No - unfortunately - from the

No - unfortunately - from the CLI on the ESA/SMA - the 'grep' command is not as intuitive as the unix/linux 'grep'.  You would need to push logs off appliance, and then take advantage of an external OS in order to parse through the logs as definitively needed.

-Robert

(*If you have received the answer to your original question, and found this helpful/correct - please mark the question as answered, and be sure to leave a rating to reflect!)

2 REPLIES
Cisco Employee

No - unfortunately - from the

No - unfortunately - from the CLI on the ESA/SMA - the 'grep' command is not as intuitive as the unix/linux 'grep'.  You would need to push logs off appliance, and then take advantage of an external OS in order to parse through the logs as definitively needed.

-Robert

(*If you have received the answer to your original question, and found this helpful/correct - please mark the question as answered, and be sure to leave a rating to reflect!)

Thanks Rob!

Thanks Rob!

182
Views
0
Helpful
2
Replies