![]() |
|
|
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 |
| Problem using grep | Prem1201 | Shell Programming and Scripting | 3 | 01-09-2008 02:45 PM |
| Grep Problem | avadhani | UNIX for Dummies Questions & Answers | 8 | 06-23-2005 03:58 PM |
| grep problem | asal_email2 | UNIX for Dummies Questions & Answers | 4 | 06-22-2005 09:49 PM |
| grep problem. help!!! | imppayel | Shell Programming and Scripting | 1 | 11-30-2004 05:49 AM |
| Grep Problem | lesstjm | Shell Programming and Scripting | 2 | 10-27-2004 11:13 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
grep problem
hi,
i need to get a count of the lines that contain 2 given patterns. eg: Line1 is <PATTERN1>blahblahblah</PATTERN1>then more text <PATTERN2>blahblahblah</PATTERN2> Line 2 is <PATTERN1>blahblahblah</PATTERN1>then some more text<INVALIDPATTERN>whatever</INVALIDPATTERN> I want to get a count of the lines that are similar to Line1. I have tried with grep -c "<PATTERN1>" | xargs grep -c "<PATTERN2>" FILE.txt but it seems to get hung probalbly because the line sizes are too long !!! Any idea fellows? Thanks. Last edited by King Nothing; 10-24-2008 at 01:48 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|