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!

SED, syntax to replace crtl/Z 1

Status
Not open for further replies.

Calator

Programmer
Feb 12, 2001
262
AU
I have a file ending in crtl/Z. I need to remove this character from the file. How do I represent ^Z within the "replaced string" syntax of sed? This code needs to be part of a shell script:

sed 's/^Z representation here//' $MY_FILE_NAME
 
How about translate?
Code:
tr -d '\032' < $MY_FILE_NAME > tmp
mv tmp $MY_FILE_NAME

032 being the octal of decimal 26, which is ctrl-z

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top