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 10-06-2008
vasanth.vadalur vasanth.vadalur is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 24
Arrow Perl script doubt?

Dear friends,

I have two files. In first file first column ($1), i have numbers.

The second file containes, the same number in the fourth column($4).

I need a output file, matching the first file column 1 with second file column 4. The main thing is the output file lines will be sorted without changing the line.


Eg:

File1:
123
124
125

File 2:

we are at 123 from unix
we are at 124 from linux
we are at 123 at script
we are at 567 at perl
we are at 125 at awk

Desired Output:
we are at 123 from unix
we are at 123 at script
we are at 124 from linux
we are at 125 at awk