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!

tr to remove ^L

Status
Not open for further replies.

DebiJo

Technical User
Apr 30, 2002
363
US
I need to add a line to a script that will strip out the ^L that seems to prefix some of the lines of a report. I tried tr -d '\014'.... command.... but it removes the entire line. The one with the \015 worked great for the ^M. Any ideas?

Thanks in advance,
Debi
 
Control L is FF which is decimal 12.

Control M that you mentioned is CR which is decimal 13. You said \015 worked for this, but decimal 15 is SI (shift in).

Maybe I am missing something.
 
the "\" indicates it is an octal number not decimal

CR Crtl-M \015 decimal 13
FF Crtl-L \014 decimal 12
 
Hi,

cat /path/to/yourfile |sed -e 's/^L//g' > file_wihout_ctrl_L

to have '^L' as one char at command line or in vi editor :
type first CTRL-V (as comination of CTRL key and v )and then type CTRL-L (as comination of CTRL key and l )

Ali
 
Ended up being a typo.... " instead of ' .

Thanks for all the responses!!!
Debi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top