I have the table
M - A A -
- A G - -
M - - - G
and I want to perform: if any column of the first line contains "-", skip printing the column
The expected output is
M A A
- G -
M - -
I have tried something like this but didn't work
awk 'NR==1 && $i!="-" {print $i}'
Does anyone know how to correct the command?
Best Answer