Skip to content

Instantly share code, notes, and snippets.

@mcnemesis
Created February 20, 2020 15:02
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 mcnemesis/8f9425b8c97ee1df422f76c82853527f to your computer and use it in GitHub Desktop.
Save mcnemesis/8f9425b8c97ee1df422f76c82853527f to your computer and use it in GitHub Desktop.
Transform a file of lines into a pythonic-list of comma delimited strings on the command line
cat old_db_tables.list.txt |sed -e 's/^/"/;s/$/"/'| tr '\n' ','|sed 's/^/[/;s/$/]/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment