Skip to content

Instantly share code, notes, and snippets.

@lnicola
Created June 20, 2014 15:51
Show Gist options
  • Save lnicola/64281bd6b27a768c51b3 to your computer and use it in GitHub Desktop.
Save lnicola/64281bd6b27a768c51b3 to your computer and use it in GitHub Desktop.
something with iconv and sed
#!/bin/bash
rm -f programe.csv
for i in *.txt;
do iconv -f UTF-16 -t UTF-8 $i | tail -n +2 | sort | sed 's/\s\{2,\}\([0-9.]\+\)/,\1/g' | sed "s/^/$i,/g" >> programe.csv;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment