![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do you delete multiple text from a comma delimited file | dolo21taf | Shell Programming and Scripting | 1 | 02-20-2008 05:12 AM |
| Parsing comma delimited text file | chengwei | Shell Programming and Scripting | 5 | 02-23-2007 05:38 AM |
| Searching directory for file that contains some text. | LordJezo | UNIX for Dummies Questions & Answers | 4 | 04-04-2006 08:58 PM |
| searching each file in a directory for text | jim majors | Shell Programming and Scripting | 2 | 03-23-2006 08:29 PM |
| Help with searching a text file | thekid2 | Shell Programming and Scripting | 6 | 01-02-2004 02:09 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Searching for text in a Space delimited File
Hi
I am trying to search a firewall syslog space delimeted file for all of the different tcp and udp destination ports. I know that grep will find lines that contain specific text. And I have tried using the the the cut command to cut out of the file certain colums. However the test I am looking for is not always in the same colum. What I would like to do is search through many log files in a directory for the text string dst_port=*** where the *** would be a wild card so I can see every destination port that has been requested from the firewall logs. Below is a snap shot of the text im trying to search through. Any help would be appreciated. Andy src=10.217.162.99 dst=10.217.208.105 src_port=4218 dst_port=135 src-xlated ip=10.217.162.99 port=4218 dst-xlated ip=10.217.208.105 po rt=135 session_id=247646 reason=Close - TCP FIN |
|
||||
|
Thankyou for your response.
Im presuming that I would need to be in vi to run the search command? Or can I run this from my regular user prompt? I have lots of files in one directory so to run vi I would need to consolidate all these files into one big file and run vi on the one consolidated file and complete the search?? Andy |
|
||||
|
Quote:
, is this the sed command being used with regular expression syntax? If so what does the s do, I know that / means search Andy |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|