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

form feed within KSH script

Status
Not open for further replies.

unmlobo

MIS
Apr 11, 2003
64
US
Our current dotmatrix printer does not form feed when you send something to print. I have worked with the makers and also with the sun gods but to no avail. I was trying to write a script that I can cat a file to and have the script form feed and print for me. Any ideas?
 
man ascii:
Oct DEC Hex Char
012 10 0A LF '\n'
014 12 0C FF '\f'
015 13 0D CR '\r'

LF: Line Feed
FF: Form Feed
CR: you know..

Cheers
 
I tried to use the \f and the FF in single quotes and db quotes and nothing. Here is the scrit that I currently have.

#!/bin/ksh

"\f"

lp -d oki

Thats it. Nothing fancy. What am I doing wrong?
 
#!/bin/ksh
# $1 - file to print

($(printf "\f"; cat ${1}) | lp -d oki

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top