read only column names from DAT file
Hello Guys,
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>
output: col1|col2|col3|col4|col5|col6|col7|col8|col9|col10
but if i want an output like:
col1
col2
col3
col4
col5
col6
col7
col8
col9
col10
what should my command look like.
Help is much appreciated.
Thanks,
|