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!

Inserting Control Characters into a File

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have written a script which creates a file for use in another system. This file needs "Control & L followed by Control & M" half way through it so that it can be printed on 2 pages. 'Print "L^M^"' doesn't work, as it occupies 4 characters instead of 2. Can I use the decimal / hex. representations, & if so, what is the syntax ?
Many thanks in anticipation.
 
If you use vi to edit the file, you can enter a control character by enter ctrl-V followed by the control character you need e.g. to enter ctrl-L ctrl-M go into insert mode and enter

ctrl-V ctrl-L ctrl-V ctrl-M

Hope this helps. CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top