Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

carriage return in unix 1

Status
Not open for further replies.

philipose

Programmer
Dec 24, 2003
137
US
This seems to be a silly thing. But I cant figure it out. How can I say substitute all commas with carriage returns ?

sed -e "s/,/?/g"

What should come in the place of "?"

Thanks
philipose
 
I'd use tr:

[tt]tr ',' '\n' <infile >outfile[/tt]

or, if you really want carriage returns:

[tt]tr ',' '\r' <infile >outfile[/tt]



HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top