![]() |
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 |
| Outputting formatted Result log file from old 30000 lines result log<help required> | vikas.iet | Shell Programming and Scripting | 5 | 12-02-2007 10:43 PM |
| displaying/ counting lines | aga | Shell Programming and Scripting | 2 | 08-08-2007 03:35 AM |
| displaying/ counting lines | aga | UNIX for Dummies Questions & Answers | 4 | 08-07-2007 12:07 PM |
| counting the number of lines | nayeemmz | Linux | 6 | 01-19-2005 12:37 PM |
| Counting lines and files | jorge.ferreira | UNIX for Dummies Questions & Answers | 6 | 12-11-2003 11:24 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
egrep counting every 2 lines of result as 1
Hi,
Can someone help me count this line: Say I have a file (file1.txt) that contains below: 11/16 13:08:19.5436 18096 --- Generating a <reading> event 11/16 13:08:19.7784 18096 ---- Sending a <writing> event 11/16 13:08:37.4516 18096 --- Generating a <reading> event 11/16 13:08:37.9199 18096 ---- Sending a <writing> event 11/16 13:09:49.8452 18096 --- Generating a <reading> event 11/16 13:09:50.0868 18096 ---- Sending a <writing> event 11/16 13:10:51.6707 18096 --- Generating a <reading> event 11/16 13:10:52.3232 18096 ---- Sending a <writing> event I would want to count every occurance of (below) as one count, 11/16 13:08:19.5436 18096 --- Generating a <reading> event 11/16 13:08:19.7784 18096 ---- Sending a <writing> event so this gives me 4 as the count for the example above. This assumes that each line is a new line. Thanks. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|