![]() |
|
|
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 |
| awk - comparing files | dbrundrett | Shell Programming and Scripting | 6 | 01-18-2009 10:51 PM |
| Comparing two files | superstar003 | Forum Support Area for Unregistered Users & Account Problems | 1 | 05-08-2008 04:34 AM |
| Comparing two files.. | padarthy | Shell Programming and Scripting | 1 | 08-29-2007 09:01 AM |
| Comparing two files... | paqman | Shell Programming and Scripting | 12 | 08-08-2007 04:45 AM |
| comparing shadow files with real files | terrym | UNIX for Advanced & Expert Users | 4 | 02-09-2007 02:38 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
comparing two files using awk.
Hi All,
a new bie to awk, How to compare substring of col1,file 1 with col2file2 and get file1contents+col3file2 as output. file1 ----- kumarfghh,23,12000,5000 rajakumar,24,14000,2500 rajeshchauhan,25,16000,2600 manoj,26,17000,2300 file 2 -------- 123,kumar,US, 123,sukumar,UK 123,raj,Germany 40,rajesh,Australia 40,jerome,swiss 40,rakesh,india output ----------------------- kumarfghh,23,12000,5000,kumar,US rajakumar,24,14000,2500,raj,Germany rajeshchauhan,25,16000,2600,rajesh,Australia manoj,26,17000,2300,, Note:so if nothing matched i should get a default value as null. Please help me,as i have been trying very hard to acheive |
|
||||
|
Help plz
hi ygor,
I have understood the script,but one more issue is that the script is taking more time if my file 1 and file2 exceeds more than 5000 records, As we are taking file2 in array,what will be limitation of the array.(bcoz in future if my file 2 increased,tats why). Can u give some tips how to improve the performance. Regards, Sukumar. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|