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

Replacing Formfeed (\f) with Carriage Return (\r) & New Line (\n)

Status
Not open for further replies.

pfildes

Programmer
Jun 17, 2004
54
GB
I have a text file with the '\f' character that I need to replace with the characters '\r\n'. I have tried the 'TR' command but that failed.

Can anybody please advise how I do this?
 
Can you tell us what you did with tr that failed? You can replace characters using vi too if you wish.

The internet - allowing those who don't know what they're talking about to have their say.
 
I tried the following command;

cat myfile.txt | tr '\014' '\015\012' > myfile.out

but this didnt seem to do anything. I was thinking that I need to replace a single character with another single character, not multiple characters
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top