Merge multiple columns from multiple files


paste file1 file2 filen | awk '{print $number_column_file1 $number_column_file2 $number_column_filen }'

note : the number of column refers to the number after files are merged

for instance, Given fileA and fileB where each of them has 2 columns. If you want to print only the first column of each file then you should type the following command :

paste fileA fileB | awk '{print $1 $3}'
  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s