It cuts, duplicates and rearranges fields in a csv file.
cutc [ -options ] < <file.csv>
-d, --delimiter Fields delimiter (default: comma)
-f, --fields Fields indexes to cut (starting from 1; could be a ranges; order matters)
-h, --header Skip csv header
-t, --trim Remove spaces and tabs from the beginnig and end of the each field
--help Help
--version Version
Cut columns 1 and 4
cutc -f 1,4 < input.csvCut columns 1, 2 and 3 and skip header row
cutc -f 1,2,3 -h < input.csvCut columns 1, 4 and 7, but print them in a specific order - 4,1,7
cutc -f 4,1,7 < input.csvCut and gzip
cutc -f 1,4,7 < input.csv | gzip -c > output.csv.gzCut columns of gzipped csv into a separate files
gunzip -c input.csv.gz | \
tee >(cutc -f 1 > output_1.csv) \
>(cutc -f 5 > output_5.csv) \
>(cutc -f 7 > output_7.csv) > /dev/nullDuplicate fields 1 and 7 multiple times
cutc -f 4,1,1,7,7 < input.csvSlice and dice... to get fields: 1,2,3,62,63,64,1,2,3,4,5,99,100,95
cutc -f 1,2,3,62-64,-5,99-,95 < input.csv