cut -s -d, -f n file to extract the nth field from each line of file. The -s option skips lines without the delimiter."/>

Easy Parsing

If you have a comma-delimited file, use cut -s -d, -f n file to extract the nth field from each line of file. The -s option skips lines without the delimiter.

If you have a comma-delimited file, use cut -s -d, -f n file to extract the nth field from each line of file. The -s option skips lines without the delimiter.

Martin Streicher is the founder of Locomotive, an expert Rails consultancy. Formerly, he was Editor-in-Chief of Linux Magazine from 2002 to 2007. You can contact him at martin.streicher@linux-mag.com and follow him on Twitter.

Comments are closed.