All,
Q: how would I add some escape codes to an interface that i have setup t print.?
Goal: to switch from NLQ to Util modes. back and forth.
Scenerio:
SCO OS 5.05
PRINTER: OKI Data 320 or similar. printer is called "test"
What I have done thus far. (just cannot get their)
I can from a #prompt
(results my printer changes to NLQ mode properly.)
any echoing from this point results in all text being NLQ mode quality...
Alternatively
(results my printer switches back to UTIL mode)
any echoing from this point results in all test being UTIL MODE quality
I have a pgm that uses a config file for all its output which just doesnt allow for these codes to be inserted.
In case your wondering its a BB3 pgm that uses a config.bbx file.
the current line status is
In the above I have tried lots of variations to toggle the NLQ/UTIL mode.. all with no luck.
So I was thinking I could modify a printer interface specifically the dumb one and make 2 printer scenerios.
DumbNLQ and DumbUTIL and then just send the desired output to the desired printer interface.
Also, I did try the
and
my particular printer just does not respond to those options (fond in the man lp pages)
I have been trying to insert the octal codes above into a dumb interface script <below) . for my printer all with no luck.
the dumb script is below.
I have commented out some of it for banner page reasons. But where if at all possible would I add the codes to toggle the printer mode.?
*********************************** Begin dumb interface Script ***************************
********************************** End of Script ***************************************
Thanks in advance for your time!
Sam
Last edited by TheSniper; 10-25-2012 at 08:07 PM..
JGT,
Thanks, first off.
I swear i have tried that exact line and location....
till I saw the 0's you added?
My code echo
your version echo
How and where did you know to add that?
-Sam
Quote:
Originally Posted by jgt
If you want to be really fancy, echo the escape sequences into a file, and then add a -o file_name to the lp statement.
Ahhh, the lp script runs as a Bourne shell, not bash.
The -e option is dropped, and the leading 0 is added to indicate that the numeric value is octal not decimal.
I was wondering why it worked while in BASH and not in the stock shell.
I dd some tests back and forth with and without the -e...
Q: if the add 0 case is the case. as in the proof? of it works..
how come all the OCTAL's dont get a the additional 0?
just the few?
Quote:
Originally Posted by jgt
Ahhh, the lp script runs as a Bourne shell, not bash.
The -e option is dropped, and the leading 0 is added to indicate that the numeric value is octal not decimal.
---------- Post updated at 07:58 PM ---------- Previous update was at 07:48 PM ----------
Is it as simple as any number (thats an octal) that doenst already start with a leading 0 zero, requires an additional 0 Zero? Kind of like an escape for an escape?
Because I noticed that the only ones that got the additional Zero were the ones that didn't
already start with one.. :?
If the first character is a 0 then the field is taken as octal. so "010" is 8 (decimal) the same as "0010" whereas "10" is 10 decimal, or 12 octal.. I usually code all 4 digits.
Just saw Alita Battle Angel with my Valentine and we really liked it. Hope many will go see it so they will make a sequel.
https://www.unix.com/members/1-albums221-picture1089.jpg (0 Replies)
Discussion started by: Neo
0 Replies
2. Post Here to Contact Site Administrators and Moderators
I purchased a ticket for Lotto which was the drawing date on 03-15-10, and when i see it now to know who wins, there is no winner while the winner number is 363? So how is the drawing process?does it also consider the ticket number which is not purchased?:confused: (4 Replies)