The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-04-2008
kamal_418 kamal_418 is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 2
comparison of 2 files

Kindly help on follows.

I have 2 files. One file contains only one column of mobile numbers. And total records in a file 12 million. Second file contains 2 columns mobile numbers and balance. and total records 30 million. I want to find out balance of each data in file 1 corresponding to file 2. I tried egrep -f but it will take very long time. And also use awk '{OFS="|"}NR<=FNR{a[$1]=$1}NR>FNR{print $1,$2,a[$1]}' a b but its given error after 7 million says long data. Can you provide me other commands. please

Thanks in advance..

Last edited by kamal_418; 08-04-2008 at 05:20 AM..