Convert tab separated text data to comma separated .CSV output with the free Swiss File Knife for Windows, Mac OS X and Linux.
sfk tabtocsv infile.txt [options]
convert plain tab separated data to csv.
default input/output format
- input fields are separated by a tab and should
not be surrounded by quotes, as these are not
interpreted. input fields themselves cannot
contain TAB characters.
- output fields are separated by comma ","
- output fields are surrounded by quotes "
if input contains a comma or quote
- if input contains quotes it is escaped as ""
-tofile x write output to file x
-quotetext surround all text by quotes
-quoteall surround all output by quotes
-outsep="x" change output separator to
character x, e.g. ; or \t
-quote="x" change quote character
web referencehttp://stahlworks.com/sfk-tabtocsvexamplessfk tabtocsv in.txt -tofile out.csv
convert tab separated to csv in default format
sfk csvtotab -quote="\x27" -insep=";" in.csv -tofile tmp.tsv
reads a CSV with input fields separated by semicolon and
surrounded by single quotes ' with ASCII code hex 27
sfk tabtocsv -outsep=";" -quote="\x27" tmp.tsv -tofile out.csv
converts tab separated to an output CSV, with output fields
separated by semicolon and surrounded by single quotes