The "common-functions" widget cannot be found.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
cancel
Showing results for 
Search instead for 
Did you mean: 

Grep command

lmyoung_ironport
Community Member

how can I enter multiple expressions on the grep command. I am trying to search the accesslogs for IP address and 403 and streaming

Thanks

5 Replies 5

gsc_ironport
Level 1
Level 1

If you want to check the accesslog for multiple expressions simply type the strings what you want to check in a sequence separated by spaces. That should work.

E.g.

Enter the regular expression to grep.
[]> john cnn.com

will list when the userid "John" tried to access that URL.

lmyoung_ironport
Community Member

I tried using a space between the expressions and not having any luck.

any other ideas? I tried name URL

jowolfer
Level 7
Level 7

I had no luck getting a double grep matching by using a space.

I did however have positive results by using standard regex like such:

10.1.1.101.*website.com

This will match a line that contains the user IP (10.1.1.101), anything in between (.*) and the website I'm looking for (website.com).

Gawayne_ironport
Community Member

That's correct, grep uses regex, so just a space will not work.
. = any character, so technically
10.1.1.101.*website.com
will match with
105151w101sdjghfjgdkfhgdfjgdkfhgdjfwebsite.com
as well as
10.1.1.101 abracadabra blah blah website.com

lmyoung_ironport
Community Member

That worked, I was able to get the information I was looking for.