![]() |
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 |
| doubt regardin regex in grep | evergreen_cool | Shell Programming and Scripting | 4 | 09-02-2008 10:57 PM |
| doubt in tr command | risshanth | UNIX for Dummies Questions & Answers | 2 | 02-25-2008 10:20 AM |
| Doubt in SED command | gksenthilkumar | UNIX for Advanced & Expert Users | 1 | 02-19-2008 02:20 PM |
| doubt in cal command | sumi | AIX | 9 | 03-03-2006 12:33 PM |
| Grep doubt | redlotus72 | UNIX for Dummies Questions & Answers | 1 | 04-15-2005 03:44 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
doubt in grep command
Hello
i am new shell scripting. I have a file like this, $ cat myfile [%XYZ12345%];/abc/abc.cpp@@/main/1;xyz [%XYZ12345%];/abc/abc.cpp@@/main/2;usr2 [%XYZ2345%];/abc/abc.cpp@@/main/1;abc [%XYZ98989%];/abc/abc.cpp@@/main/2;usr2 [%abc%];/abc/abc.cpp@@/main/1;usr1 when i grep the file. $ grep "abc" myfile [%XYZ12345%];/abc/abc.cpp@@/main/1;xyz [%XYZ12345%];/abc/abc.cpp@@/main/2;usr2 [%XYZ2345%];/abc/abc.cpp@@/main/1;abc [%XYZ98989%];/abc/abc.cpp@@/main/2;usr2 [%abc%];/abc/abc.cpp@@/main/1;usr1 but i want to grep the lines which are having [%abc%] string. so my expected result is [%abc%];/abc/abc.cpp@@/main/1;usr1 please help me to get the result. Thanks in advance. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|