Lazily trying to paste a long list of strings into python, which means I need things wrapped in quotes (and commas, but I'm excluding them from this example cause they're easy). Grabbing the strings from a file using awk
, but since quotes (apostrophes) are special in awk
this messes things up a little. The way to do it is either
awk '{ print "'"'"'"$F"'"'"'" }' file.txt
(I kid you not), or
awk '{ print "\047"$F }' file.txt
where $F
is whatever field of file.txt
is interesting.
I think the second method might be a bit nicer.