Comments on: How to Convert CSV File to TSV File in Linux https://www.tecmint.com/convert-csv-to-tsv/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Fri, 14 Jul 2023 05:45:37 +0000 hourly 1 By: Lex https://www.tecmint.com/convert-csv-to-tsv/comment-page-1/#comment-2026981 Fri, 16 Jun 2023 13:09:08 +0000 https://www.tecmint.com/?p=51802#comment-2026981 Hey Ravi, thank you for your article.

I believe there missed the most simple way to resolve the topic.

You can just use `tr “,” “\t“`.

For example:

$ echo 'one,two,three' | tr "," "\t"

Does it make sense for you?

]]>
By: Ravi Saive https://www.tecmint.com/convert-csv-to-tsv/comment-page-1/#comment-2026924 Fri, 16 Jun 2023 06:37:37 +0000 https://www.tecmint.com/?p=51802#comment-2026924 In reply to NoWay.

@Jose,

To separate the data fields of a CSV file into a TSV (Tab-Separated Values) format using the following awk command.

$ awk 'BEGIN { FS=","; OFS="\t" } { print $1, $2, $3, $4 }' tecmint.csv > tecmint.tsv

This command assumes that your input file is named tecmint.csv, and the resulting TSV file will be named tecmint.tsv.

]]>
By: NoWay https://www.tecmint.com/convert-csv-to-tsv/comment-page-1/#comment-2026836 Thu, 15 Jun 2023 21:51:38 +0000 https://www.tecmint.com/?p=51802#comment-2026836 Simple conversions, but it doesn’t solve the problem mentioned at the beginning of the article.

“While CSV files separate values with commas, TSV files use tabs, which can make data handling easier, especially when dealing with commas within the data itself.”

These methods will convert all commas to tabs, not just the ones that separate the data fields.

]]>