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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to enter a newline

Status
Not open for further replies.

komark

Technical User
Sep 12, 2005
134
US
Hi,
I am doing a grep to get:
a,b,c,d

and I trying to pipe sed command to make it look like

a
b
c
d
I am not having any success
sed 's/,/\r/g'

Thanks in advance
Omar.
 
Or pipe it through
[tt]|tr ',' '\n'[/tt]


HTH,

p5wizard
 
Thank you guys but didnt work for me.

I had to do this to get it working:
tr ',' '\012' < file

\012 is ascii for carriage return

-omar
 
What type of Unix or Linux or similar? i.e. what operating system?

Annihilannic.
 
or

| paste -

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top