Sending control sequence to printer before job

I am having difficulty sending a control sequence ESC&l5H (print to middle tray) to a HP printer (lp4).It is ignoring the command. I am using the following syntax in an executable file :

echo "'/033'&l5H" > /dev/lp4
lp -dlp4 filename

a) Is /033 'escape' ?
b) What is the correct syntax ?

I don't know anything about printer control sequences, but I can see that you have the wrong slash. You want something like:

/bin/echo "\033"

There must be a better way to do this, though. Isn't there a '-o <option>' you could use to control this?

Did you get an answer to this?
We are on digital unix and we use \E&l5H
If you can find a manual for the printer the pcl commands are listed in the back....

Thanks ! At least I know I'm heading in the right direction.
I am using an AIX box.

I have tried the following : echo "\E&L5H" > /dev/lp4

(and echo "\033&L5H") but to no avail.

Is that the syntax you use , MsGail?

I'm not sure what you are trying to accomplish using the echo. I've only been doing this for a few years, but I think the echo won't set the printer. We usually use pre-defined drivers with pcl or a script to do this.
Here is an example of a few lines from a script to setup a printer for landscape. We have an iteractive menu driven script for our end users to direct and print files.



Many thanks ! I can see clearly now the echo has gone . . .