![]() |
|
|
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 |
| MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else | hariza | Shell Programming and Scripting | 4 | 09-18-2008 03:56 AM |
| Print lines after grep | jakSun8 | Shell Programming and Scripting | 4 | 06-25-2008 03:34 PM |
| using grep and print filename | ahjiefreak | Shell Programming and Scripting | 5 | 01-10-2008 11:47 AM |
| to grep and print their counts | cdfd123 | Shell Programming and Scripting | 12 | 10-15-2007 12:34 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Grep & print
I just need to print value 12 digit number after the key *MI*. My big concern is the below lines are not fixed format or length so cant cut based on the position.
XSA*00**00**XZ*DA-Paper*30*942411167****MI*010001990802~AEE XSA*00**00**ZZ*EA-aper*30*94169****MI*010001960802~SDRE*ER SSA*00**00**CZ*BA-Paper*30*2411167****MI*010001790802~AD*a* XSA*00**00**ZZ*DA-Raper*30*942167****MI*010001980802~A*c8* XSA*00**00**ZA*DA-Raper*30*9424111****MI*010001880802~ae*ae Basically I need the output as *010001990802~ *010001960802~ *010001790802~ *010001980802~ Thanks in advance |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|