[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help: How replace comma with a tab in a text file?



Sie schrieben:
> Hi,
> 
> I have a comma delimited ex-database file and I want to replace the commas
> with tabs. I tried using:
> 
> sed s/,/\tab/ filename but no go. It was a guess anyway. I tried replacing
> the tab with a * and it worked, but only for first line of items, mleaving
> the rest of the fields with commas.
> 
> Any suggestions?
> 
You could use tr for this job:

tr ',' '\t' < file > newfile

MH

-- 
(Dr.) Michael Hummel
mailto: mh@seitung.net
		molino@gmx.net
--
fprint = F24D EAC6 E3D7 372C 9122 D510 EB24 01CA 0B56 B518
key: http://www.seitung.net/key

Attachment: pgpHNKl614UwQ.pgp
Description: PGP signature


Reply to: