![]() |
|
|
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 |
| Extract all the content after a specific data | patrick87 | Shell Programming and Scripting | 22 | 4 Weeks Ago 04:04 AM |
| find: No match due to find command being argument | mst3k4l | Shell Programming and Scripting | 2 | 08-10-2009 10:48 AM |
| How to find first match and last match in a file | praving5 | Shell Programming and Scripting | 3 | 04-01-2009 08:33 AM |
| X11 auth data does not match fake data | samytrix | UNIX for Dummies Questions & Answers | 1 | 08-15-2008 04:32 PM |
| sed: find match and delete the line above | cstovall | Shell Programming and Scripting | 3 | 07-02-2008 11:31 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I just try both of the code that you suggested. End up It will link all the data together and generated the output like this: 1285_t chris germany 8288_c steve england 9626_a dave swiss Do I did anything wrong? Thanks again, frans ![]() |
|
||||
|
If it is too slow, you could test if awk runs faster. Especially mawk is lightning quick. Code:
awk 'NR==FNR{a[$1]=1;next}a[$1]' file1 file2>file3
---------- Post updated at 03:37 AM ---------- Previous update was at 03:35 AM ---------- Oops somehow missed panyam's answer. Oh well.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|