Skip to content

Instantly share code, notes, and snippets.

@werelax
Created April 5, 2017 20:21
Show Gist options
  • Save werelax/db125914d73a710855871da96dc0f7b1 to your computer and use it in GitHub Desktop.
Save werelax/db125914d73a710855871da96dc0f7b1 to your computer and use it in GitHub Desktop.
ghetto CSV tools
#!/bin/sh
#
# Usage: ./csv-viewer.sh ';' input.csv
#
iconv -f utf8 -t ascii//TRANSLIT $2 | column -s$1 -t | less -S -N
#!/bin/sh
#
# Usage: ./random-sample.sh 1000 input.csv > ouput.csv
#
head -n 1 $2
tail -n +1 $2 | shuf -n $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment