Last active
February 16, 2017 02:57
-
-
Save lengerfulluse/8dfed7278bc00a0ba352e6dd3a174e45 to your computer and use it in GitHub Desktop.
common perl command for shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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