Some Useful Linux Command Lines for Manipulating CSV Files

Shen Lu
Posted on Aug 31, 2023
views
1 min read (109 words)
Recently I am working on a site. The most tedious work is generating and collecting data. Today I list some frequently used Linux commands for manipulating CSV files.
Here is the example that If you want to delete the 12th column in CSV file
cut -d, -f12 --complement older.csv > newer.csv
awk '{printf "%s,%s\n", NR,$0}' older.csv > newer.csv
sed -r 's/^[^,]+,//' older.csv > newer.csv
find /one/folder -iname \*.jpg -print0 | xargs -I{} -0 cp -v {} /another/folder