Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Korn Shell scripting question - suggestions requested
User Name
REGISTER NOW! Mark Forums Read

sponsored links

1 14th June 06:22
External User
Posts: 1
Default Korn Shell scripting question - suggestions requested

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.

  Reply With Quote

  sponsored links

2 14th June 06:22
mark taylor
External User
Posts: 1
Default Korn Shell scripting question - suggestions requested

this is ugly.....and it wont work (you should use Adobe ; echo $?)

try using

if head -1 $@ | grep -i adobe >/dev/null
print "we have hit"

Posted via
  Reply With Quote

Thread Tools
Display Modes

Copyright 2006 - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -