Skip to content

Instantly share code, notes, and snippets.

@freekai
Created January 18, 2016 03:32
Show Gist options
  • Save freekai/02bc1c2f6056b2fc903f to your computer and use it in GitHub Desktop.
Save freekai/02bc1c2f6056b2fc903f to your computer and use it in GitHub Desktop.
bash script to convert CVS to comma-separated list of feature values (for plotting).
x=""; y=""; cat ex2data1.txt | egrep '0$' | { while read i; do x="$x, $(echo $i | awk -F, '{ print $1}')"; y="$y, $(echo $i | awk -F, '{ print $2}')"; done; echo $x; echo $y; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment