Skip to content

Instantly share code, notes, and snippets.

@localstatic
Created July 1, 2013 22:18
Show Gist options
  • Save localstatic/5905122 to your computer and use it in GitHub Desktop.
Save localstatic/5905122 to your computer and use it in GitHub Desktop.
Convert list of items (one item per line) to single CSV line
cat input.txt | sed 's/\(.*\)/\1,/' | tr \\n ' ' | sed 's/, $//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment