1

remove column based on the same value

view story
linux-howto

http://www.unix.com – Hello, I have some problem to remove the columns which have the duplicate value of -9 which is in every row except -9 in some row. Input file showed in below : Code: Col1 Col2 Col3 Col4 Col5 Col6 A  1  A  -9  0  -9 B  2  T  -9  -9  -9 C  3  D  -9  1  -9 D  4  R  -9  2  -9 Output should be showed like this : Code: A  1  A  0 B  2    T  -9 C  3    D  1 D  4    R  2 Col4 and Col6 contain -9 in all, (HowTos)