![]() |
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 |
| Sed to delete exactly match pattern and print them in other file | new_buddy | Shell Programming and Scripting | 3 | 07-10-2008 02:59 AM |
| sed - Replace Line which contains the Pattern match with a new line | kousikan | Shell Programming and Scripting | 2 | 03-24-2007 07:24 AM |
| SED: match pattern & delete matched lines | not4google | Shell Programming and Scripting | 7 | 11-22-2006 09:58 AM |
| How to delete lines do NOT match a pattern | JumboGeng | UNIX for Dummies Questions & Answers | 1 | 09-20-2006 05:52 AM |
| match a pattern, print it and the next line | nymus7 | Shell Programming and Scripting | 4 | 07-29-2005 12:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
hi,
i am parsing a file, in that searching for lines those contains "$threadNo.Received message:" , if that line contains the required fields write them into a separate file other wise ignore them. i am using the following code,but it is printing all the lines , i dont want to rpint , please help cat $file | grep -i "$threadNo.Received message:" if [ $? -eq 0 ] then cat $file | grep -i "$threadNo.Received message:" > $threadNo.File else echo "The line does not contain the required fields" fi |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|