![]() |
|
|
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 |
| print only matched string instead lines in grep | anchal_khare | Shell Programming and Scripting | 3 | 02-18-2009 04:34 AM |
| print only last two words of a line | pradeepreddy | Shell Programming and Scripting | 5 | 08-22-2008 02:23 AM |
| print last matched pattern using perl | er_ashu | Shell Programming and Scripting | 5 | 07-23-2008 03:18 AM |
| SED: delete and print the only exact matched pattern | new_buddy | Shell Programming and Scripting | 6 | 07-09-2008 05:19 AM |
| AWK - Extracting matched line | not4google | Shell Programming and Scripting | 9 | 11-02-2006 11:02 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Print two matched words from the same line
Hi experts I need to pick 2 matched words from the same line..... I have given below an example file eg: Code:
O14757 hsa04110 hsa04115 2 P38398 hsa04120 1 O15111 hsa04010 hsa04210 hsa04920 hsa04620 hsa04660 hsa04662 hsa05200 hsa05212 hsa05221 hsa05220 hsa05215 hsa05222 hsa05120 13 O14920 hsa04010 hsa04210 hsa04910 hsa04920 hsa04620 hsa04660 hsa04662 hsa05200 hsa05212 hsa05221 hsa05220 hsa05215 hsa05222 hsa04930 hsa05120 15 O15264 hsa04010 hsa04370 hsa04912 hsa04620 hsa04664 hsa04670 hsa05014 hsa05120 8 Q15139 O15297 hsa04115 1 Q00987 hsa04120 hsa04110 hsa04115 hsa05200 hsa05214 hsa05220 hsa05218 hsa05219 hsa05215 9 O43464 hsa05012 1 P98170 hsa04120 hsa04210 hsa04510 hsa05200 hsa05222 5 From the above file i have to pick only the 6 letter alphanumerical words(highlighted words) in the given below format ie, Code:
O14757 P38398 O15111 O14920 Pls reply me asap Last edited by pludi; 11-02-2009 at 06:20 AM.. Reason: code tags, please... |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|