Forget passwords
turbodingo.com1 pointsby dbro0 comments
csvquote file.csv | awk -F, '{print $1}' | csvquote -u
By using the "-u" flag in the last step of the pipeline, all of the problematic quoted delimiters get restored. cat textfile.csv | csvquote | awk -f myprogram.awk | csvquote -u > output.csv
Also works for other text processing tools like cut, sed, sort, etc. # some results based on running speed tests on a lightweight netbook:
# standard error = 0.01, 10kb of registers
# < 1 ms per init()
# < 1 ms per update()
# < 1 ms per count() for single set
# ~30 ms per set for count() of union of sets
csvquote: https://github.com/dbro/csvquote
Especially for use with existing shell text processing tools, eg. cut, sort, wc, etc.