Linux join command

join command combine the line from 2 files. and make new lines, that every line contain in the beging the line from the first file, follow by the corresponding line from the second one.
The structure is the following:
join <fileName1> <fileName2>

For example we file1 contain

 Washington
London
Paris

and file2 contain

United State
United Kingdom
French

Then


$join file1 file2
 Washington United State
 London United Kingdom
 Paris French
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s