read only column names from DAT file
I am struck trying to accomplish a specific tasks and need some help to proceed forward.
I have a DAT file with more than 100,000 lines, the first line is the header.
looks like: col1|col2|col3|col4|col5|col6|col7|col8|col9|col10
I need to read only these columns from this file for which I am doing
head -1 <file-name>
but if i want an output like:
what should my command look like.
Help is much appreciated.