Let say I have a file as below:
number 2 6 7 10 number 6 13
name1 A B C D name1 B E
name2 A B C D name2 B E
name3 B A D A name3 A F
name4 B A D A name4 A F
I wish to remove the entirely the same duplicate columns and the output file is as below:
number 2 6 7 10 13
name1 A B C D E
name2 A B C D E
name3 B A D A F
name4 B A D A F
I use sort and uniq command for lines but never know how to do for columns. Can anyone suggest a good way?
awk '{print $1, $2, $3, $4, $5, $7, $8}' file > file.new? (Note the missing $6). Good luck.awk '{$6="";$7="";print}' [filename]