Skip to content

Instantly share code, notes, and snippets.

@lengerfulluse
Last active February 16, 2017 02:57
Show Gist options
  • Save lengerfulluse/8dfed7278bc00a0ba352e6dd3a174e45 to your computer and use it in GitHub Desktop.
Save lengerfulluse/8dfed7278bc00a0ba352e6dd3a174e45 to your computer and use it in GitHub Desktop.
common perl command for shell
# remove end ^M character
perl -pe 's{\d+\.\d+%}{$&/100}eg'
# parse csv file, convert to tsv file.
perl -MText::ParseWords -lne'
print join "\t", map "$_",
parse_line(",",0, $_); # if you want to keep the double-quotes of the field, just use put '1' instead of 0 as the second parameter.
' infile.csv >infile.tsv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment