Awk: extract different columns from many different files

前端 未结 3 1339
北恋
北恋 2020-12-09 06:40

File Example

I have a 3-10 amount of files with:

 - different number of columns
 - same number of rows
 - inconsistent spacing (sometimes o         


        
3条回答
  •  旧巷少年郎
    2020-12-09 07:41

    In your paste / cut attempt, replace cut by awk:

    $ paste <(awk '{print $1}' file1 ) <(awk '{print $3}' file2 ) <(awk '{print $7}' file3) <(awk '{print $1}' file4)
    

提交回复
热议问题