Skip to content

Instantly share code, notes, and snippets.

@darrenterhune
Created October 11, 2018 03:31
Show Gist options
  • Save darrenterhune/b1631711553c67b74a753723df77fe9c to your computer and use it in GitHub Desktop.
Save darrenterhune/b1631711553c67b74a753723df77fe9c to your computer and use it in GitHub Desktop.
Add quotes to a csv file directly in the terminal
# Run this in terminal, then paste in csv into terminal window
# https://stackoverflow.com/questions/17157850/quotation-mark-into-csv-per-field-awk-sed/17158450#17158450
ruby -rcsv -ne 'puts CSV.generate_line(CSV.parse_line($_), :force_quotes=>true)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment