![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep usage - exit after first occurrence | nhatch | UNIX for Dummies Questions & Answers | 5 | 12-05-2008 08:05 PM |
| Getting the lines between last occurrence of two patterns | rvz | Shell Programming and Scripting | 8 | 08-08-2008 05:32 PM |
| SED replace string by occurrence | uttamhoode | Shell Programming and Scripting | 4 | 03-05-2008 05:04 AM |
| Replace second occurrence only | lyoncc | Shell Programming and Scripting | 5 | 12-26-2007 11:21 PM |
| awk + last occurrence | agibbs | UNIX for Dummies Questions & Answers | 2 | 10-06-2007 03:32 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Grep for the same occurrence or maybe Sed
Hi, I have a file that looks like this
dasdjasdjoasjdoasjdoa SYN dakspodkapsdka asdasdasdasdasdasdasd SYN sdfsdfsdfsdfdf shfishifhsdifhsidhfif fsdfsdfsdfsdfs sdfsdfsdfsdsdfsdfsdff cercercercerce sdasdajsdoajsodasodoo FIN dasdaskdpasdda dkaspdkaskdpaskpaskdp FIN asdasdasdasdas dasdjasdjoasjdoasjdoa SYN dakspodkapsdka asdasdasdasdasdasdasd SYN sdfsdfsdfsdfdf shfishifhsdifhsidhfif fsdfsdfsdfsdfs sdfsdfsdfsdsdfsdfsdff cercercercerce sdasdajsdoajsodasodoo FIN dasdaskdpasdda dkaspdkaskdpaskpaskdp FIN asdasdasdasdas The file is a huge log file with always 2 lines with SYN in exactly the same place one after the other, and also 2 FINS together. We have discovered that we are getting errors where 3 SYN lines are together, and I want to identify where these occurences are ie dasdjasdjoasjdoasjdoa SYN dakspodkapsdka asdasdasdasdasdasdasd SYN sdfsdfsdfsdfdf asdasdasdasdasdasdasd SYN sdfsdfsdfsdfdf shfishifhsdifhsidhfif fsdfsdfsdfsdfs sdfsdfsdfsdsdfsdfsdff cercercercerce sdasdajsdoajsodasodoo FIN dasdaskdpasdda dkaspdkaskdpaskpaskdp FIN asdasdasdasdas Ive looked at using grep to search for '3 SYNS' but i cant seem to get it to work. Does anybody know how i can search for an occurrence of SYN in the same place , three lines running Any help would be greatly appreciated |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|