Skip to content

Instantly share code, notes, and snippets.

@qi-qi
Created February 13, 2019 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qi-qi/133b5b21d46c3900bae56dd08c3b0063 to your computer and use it in GitHub Desktop.
Save qi-qi/133b5b21d46c3900bae56dd08c3b0063 to your computer and use it in GitHub Desktop.
Handy bash
sort -t , -k 2 -g data.file
=============================
-t separator
-k key/column
-g general numeric sort (sort string treated as number)
sed 's/\"//g' fe88422a-e3b5-4645-9d66-c15f7e1a01b6.csv > file_new.txt
=============================
remove " (double quotes)
sed 's/,/-/g' file_new.txt > file_new2.txt
=============================
replace , with -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment