2011年10月10日 星期一

awk command to merge columns from two separate files into single file

> cat file1
one two three
one two three
one two three
one two three

> cat file2
four five six
four five six
four five six
four five six

> pr -m -t -s file1 file2 | gawk '{print $4,$5,$6,$1}'
four five six one
four five six one
four five six one
four five six one

沒有留言:

張貼留言