Sending Octal Escape codes to printer

Sending Octal Escape codes to printer

Post by David Lom » Tue, 30 Jun 1992 04:50:52



Hi all:
A few weeks ago I posted the following to comp.unix.shell and got exactly
zero answers. I don't particularly like to see wads of cross-postings on
questions, and don't flame me about posting to the wrong group. They didn't
answer - at least I didn't see any responses.
--
How does one go about echoing two cat'ed codes to the printer? Specifically
I'm trying to setup an alternative "interface" script for a printer. This
printer has, as a default, the programmable switch-setting set for no-print
over perforation. This can be re-set, either manually, or by echoing the
appropriate code to the printer. Unfortunately, this requires two codes in
the familiar escape sequence. Escape + "N" to set it, and Escape + "O" to
re-set it.

/bin/sh

One code is trivial      -  echo "\014\c" ( for form-feed )

We'd like to send Escape + "N" i.e. [ echo "\033\c\096\c" ] doesn't work
We'd like to send Escape + "O" i.e. [ echo "\033\c\097\c" ] doesn't work

What's the trick ?
--


Lomas Data Management Inc.       | Has anyone noticed that DOS is SOD spelled |
Niagara Falls, Ontario Canada    | backwards as in the British "Sod-off" ?    |
#      Any opinions expressed are those of my previous employer
--
David Lomas

 
 
 

Sending Octal Escape codes to printer

Post by Clarence Do » Wed, 01 Jul 1992 04:56:15



Quote:> We'd like to send Escape + "N" i.e. [ echo "\033\c\096\c" ] doesn't work
> We'd like to send Escape + "O" i.e. [ echo "\033\c\097\c" ] doesn't work

I suspect that \c is only useful at the end of a quoted string, and that you
want [ echo "\033N\c" ], especially since 096 can't be octal, although it is
a nice interpolation of \0116.

--
---

               ...pyramid!ctnews!tsmiti!dold

 
 
 

Sending Octal Escape codes to printer

Post by Warren Burste » Thu, 02 Jul 1992 21:05:41



Quote:>We'd like to send Escape + "N" i.e. [ echo "\033\c\096\c" ] doesn't work

096 isn't octal.  Also, \c only goes at the end of the string,
and you can put N in the string, so echo "\033N\c"
--
/|/-\/-\       The entire world         Jerusalem
 |__/__/_/     is a very cold theft.

/ nysernet.org is not concerned at all.
 
 
 

1. Sending escape codes to printer ???

How you can send escape codes to the printer ??
I am using a Desk Jet Plus and I try to send escape
characters using: echo ^[k2G > /dev/lp1 ( ^[ are two
characters ^ and [ ) but I dont'd think that it works
since it just print the string .
I am using linux 0.96b patchlevel 1.

Thank you in advance,
Harry Georgopoulos

2. RH 6.2 + Solaris 2.6 x86 LILO Setup

3. Promblem sending printer codes to printer

4. Linux newbie needs a little help...

5. Sending escape sequences to a dot matirx printer

6. should I worry about IRQ timeouts?

7. Send escape characters to a printer

8. APC SmartUPS Monitoring Software?

9. Sending escape characters to the printer

10. How to send escape sequence to a printer ?

11. Sending ESCAPE SEQUENCESto a printer

12. Printer Escape codes

13. Linux eating Escape Codes for printer