Converting comma-delimited data to tab-delimited 
Author Message
 Converting comma-delimited data to tab-delimited


if you just want to replace all commas by tabs, try this one:

perl -ne 's/,/\t/g; print $_;' file.csv >

mfg Frank.

On 31-Mar-02 Randall Perry sat down, thought for a long time and then

> Searched  through the archives and found this perl one-liner that's
> supposed
> to replace commas with tabs in text files.

> It worked in as much as it created the new output file; but the
> output was
> exactly the same as the input.

> Anyone know what's wrong? Or have another way to do this?

> perl -ne 's/^ *"//; s/" *$//; print join("\t", split(/\" *, *\"/))'
> your-table.csv >

> --
> Randy Perry
> sysTame
> Mac Consulting/Sales

> phn                 561.589.6449

> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?

> http://www.***.com/

Frank Finner

Thus we are all responsible for one another, through all the myriad
dimensions of time and space that make up the multiverse . . .
                              (M. Moorcock, "The Revenge Of The Rose")

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate

message can get through to the mailing list cleanly

Sun, 19 Sep 2004 04:10:20 GMT
 [ 1 post ] 

 Relevant Pages 

1. Changing Tab-delimited file to Comma-delimited

2. Convert MS Word's Mail Merge data to tab-delimiting or DBF file

3. bar-delimit to tab-delimit

4. Creating an export in comma or tab delimited

5. Importing tab delimited file including commas

6. Convert Recordset to comma delimited text file in VB4

7. Converting comma delimited text to DBF

8. Converting comma delimited list to table

9. Need to convert 2.6 .dbf to comma delimited...

10. Converting COMMA Delimited to .MDB ?

11. Converting Paradox to Comma-delimited ???

12. Want to export data to comma-delimited file.

Powered by phpBB® Forum Software