Thursday, September 1, 2016

Cut a particular column and concatenate using shell commands

Eg, to extract the first column (tab delimited) starting from the 2nd line, and concatenate output using comma:
tail -n +2 file | cut -f1 | paste -sd,