cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2723
Views
0
Helpful
2
Replies

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

 

1 Accepted Solution

Accepted Solutions

Robert Sherwin
Cisco Employee
Cisco Employee

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!)

View solution in original post

2 Replies 2

Robert Sherwin
Cisco Employee
Cisco Employee

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!