Mombu 2012-06-14 06:22:19
I have a question regarding a printer script problem I am trying
to resolve. My company has a postscript file that is produced from
Oracle and prints custom timesheets. For some reason, it has a default
call for A4 paper – this errors out the print job and some printers
handle it and we can override and print while other printers don’t and
the output is flushed at the device.
another. All landscape print was directed to this and other problems
resulted. So, I wrote a test to see if the file was a postscript or
not, but this required a relative variable –
if [[ `head -1 $@ | grep -i Adobe | echo $?` = 0 ]];then
print “We have hit”
The sed substitution would go on the “We have hit” line.
The problem now is that I can’t get the script to recognize and pass
the relative var for the printfile to the enclosed head command. So I
tried another call with:
cat /etc/motd > /tmp/motd.out
This will produce output if I run it from the command line against a
canned printfile. But it won’t produce output if generated by the
qdaemon from Oracle. So I am having trouble debugging this.
Do you know anyone who has print and Kornshell expertise that I could
talk to about this?
Any suggestions would be much appreciated.
Mark taylor 2012-06-14 06:22:46
this is ugly…..and it wont work (you should use Adobe ; echo $?)
if head -1 $@ | grep -i adobe >/dev/null
print “we have hit”
Posted via http://dbforums.com