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

Substitution and newline in file 1

Status
Not open for further replies.

moria6

MIS
Jul 11, 2000
30
0
0
US
Thanks to one of the helpful people in this forum I learned how to use "tr" for substitution. What I'd like to do now is add a newline to what I'm doing.

I have <filename> containing:


after using

cat <filename> | tr "|" "\n"

I get

.
.
.


What I'd like is




.

.

Being relatively new to scripting I tried

cat <filename> | tr "|" "\n\n"

which gave me the same results as the original cmd. Also tried |'ing output into sed but didn't get it to work.

Any tips on how to modify the cmd or to accomplish it another way would be appreciated.

TIA!

maurie
 
Worked perfectly. Thanks, Feherke!


maurie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top