Content of a sample file is as follow:
AA BB CC DD BB 1 2 3 4 9 5 6 7 8 10
I want to display the whole columns that contain
DD. In the real case, I do not know which columns contain the strings
DD. And additionally, it will be great to determine order of the columns that will be printed.
The desired output is:
BB DD BB 2 4 9 6 8 10
When it is said that
DD column must be first, the desired output is:
DD BB BB 4 2 9 8 6 10
Column ordering may given in a string e.g.
Delimiter of the input file may change.