Skip to content

Instantly share code, notes, and snippets.

@danielef
Created March 18, 2016 21:12
Show Gist options
  • Save danielef/34145ba28dede7bcfe1b to your computer and use it in GitHub Desktop.
Save danielef/34145ba28dede7bcfe1b to your computer and use it in GitHub Desktop.
Delete white spaces for CSV
#!/bin/bash
for i in $( ls *.utf8.csv ); do grep -v ',,,,,,,,,,,,,,,,,,,,,,' $i | tail -n +2 | perl -pe 'chomp if eof' > ${i:0:$((${#i}-8))}san.utf8.csv; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment