<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problems with Interface Script for Remote Printer in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769182#M939445</link>
    <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;Try these links,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;docId=200000060581545" target="_blank"&gt;http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;docId=200000060581545&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;docId=200000059833057" target="_blank"&gt;http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;docId=200000059833057&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
    <pubDate>Mon, 22 Jul 2002 13:25:27 GMT</pubDate>
    <dc:creator>Sanjay_6</dc:creator>
    <dc:date>2002-07-22T13:25:27Z</dc:date>
    <item>
      <title>Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769179#M939442</link>
      <description>I've got an Oce printer on my local network, and configured it as a remote&lt;BR /&gt;printer to my 11i system (rp5470) using SAM so I could get as much stuff&lt;BR /&gt;defaulted as possible.&lt;BR /&gt;&lt;BR /&gt;The Oce is on the network via a PC interface, and thus anything that gets sent&lt;BR /&gt;to the printer needs to be pushed thru the ux2dos filter on the way out.  I'd&lt;BR /&gt;like to just have the interface script deal with invoking ux2dos, due to the&lt;BR /&gt;facts that (a) my user base isn't all that sophisticated and (b) trying to get&lt;BR /&gt;everyone to remember to precede all printing with "ux2dos" seems like it's&lt;BR /&gt;something that could more easily be handled at the system level.&lt;BR /&gt;&lt;BR /&gt;In other words, instead of forcing my users to *always* use&lt;BR /&gt;&lt;BR /&gt;ux2dos &amp;lt;&lt;FILENAME&gt;&amp;gt; | lp -doce&lt;BR /&gt;&lt;BR /&gt;I'd like to just plop the invocation of "ux2dos" in the right place in the&lt;BR /&gt;Oce's interface script.  However, I'm stumped as to where's the correct place &lt;BR /&gt;to insert the ux2dos command.  Depending on what I do in the script, I get &lt;BR /&gt;multiple copies of my files output.  Please read on...&lt;BR /&gt;&lt;BR /&gt;The original interface script had, after dealing with any options passed to&lt;BR /&gt;it, the following:&lt;BR /&gt;&lt;BR /&gt;shift; shift; shift; shift; shift&lt;BR /&gt;&lt;BR /&gt;      /usr/sbin/rlp -I$requestid $BSDC $BSDJ $BSDT $BSDi $BSD1 $BSD2 $BSD3 $BS&lt;BR /&gt;D4 $BSDw $BSDformat $BSDh $1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I first inserted the lines&lt;BR /&gt;&lt;BR /&gt;      ux2dos &amp;lt;$1 &amp;gt;/tmp/ux2dos$$&lt;BR /&gt;      mv /tmp/ux2dos$$ $1&lt;BR /&gt;&lt;BR /&gt;just before the rlp.  This works fine if the input to lp(1) is either a single&lt;BR /&gt;file or an input pipe.  If the lp command is for two files -- like  lp a b  --&lt;BR /&gt;then "a" would be pushed thru ux2dos but b got passed across "raw".&lt;BR /&gt;&lt;BR /&gt;OK, so I changed that section of the script to&lt;BR /&gt;&lt;BR /&gt;spoofles="$*"&lt;BR /&gt;holdRet=0&lt;BR /&gt; &lt;BR /&gt;for spoolfile in $spoofles&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;        ux2dos &amp;lt;$spoolfile &amp;gt;/tmp/ux2dos$$&lt;BR /&gt;        mv /tmp/ux2dos$$ $spoolfile&lt;BR /&gt;&lt;BR /&gt;        #echo "Before rlp on spoolfile $spoolfile" &amp;gt;&amp;gt; /tmp/mrlptr&lt;BR /&gt;&lt;BR /&gt;        /usr/sbin/rlp -I$requestid $BSDC $BSDJ $BSDT $BSDi $BSD1 $BSD2 $BSD3 $BS&lt;BR /&gt;D4 $BSDw $BSDformat $BSDh $spoolfile&lt;BR /&gt;        ret=$?&lt;BR /&gt;        if [ $ret != 0 ];&lt;BR /&gt;        then&lt;BR /&gt;           holdRet=$ret&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This, too, works fine when lp is fed either an input pipe or a single file.&lt;BR /&gt;When I try printing two files at once, though, I get *FOUR* files on the&lt;BR /&gt;printer.  Using "lp a b" again, I get an un-ux2dos-ed copy of "a", an &lt;BR /&gt;un-ux2dos-ed copy of "b", a ux2dos-ed copy of "a", and a ux2dos-ed copy of &lt;BR /&gt;"b".&lt;BR /&gt;&lt;BR /&gt;If I uncomment the echo command in the middle of loop, I see only *two*&lt;BR /&gt;messages sent to the trace file in /tmp -- yet somehow *four* things got&lt;BR /&gt;thrown at the rlp command, even though the interface script showed that&lt;BR /&gt;we fell thru the section with rlp *twice*.&lt;BR /&gt;&lt;BR /&gt;Can anyone slap me up-side the head and show me where I've screwed this up?&lt;BR /&gt;If two files are fed to lp for this printer, I'd like to see *two* files&lt;BR /&gt;get printed, both of them having gone thru ux2dos.  I can underkill and&lt;BR /&gt;overkill this problem, but I can't just kill it.&lt;BR /&gt;&lt;BR /&gt;Help?  Please?&lt;BR /&gt;&lt;BR /&gt;Mike Reaser&lt;BR /&gt;Southeastern Data Cooperative&lt;BR /&gt;Tucker, GA&lt;/FILENAME&gt;</description>
      <pubDate>Mon, 22 Jul 2002 12:57:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769179#M939442</guid>
      <dc:creator>Mike Reaser</dc:creator>
      <dc:date>2002-07-22T12:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769180#M939443</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Try&lt;BR /&gt;&lt;BR /&gt;/usr/bin/ux2dos $1 &amp;gt; /tmp/$$&lt;BR /&gt;mv /tmp/$$ $1&lt;BR /&gt;/usr/bin/rlp ......(as "usual")&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;         Steve Steel&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2002 13:09:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769180#M939443</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-07-22T13:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769181#M939444</link>
      <description>Thanks for the suggestion, Steve, but it just misses.&lt;BR /&gt;&lt;BR /&gt;With those lines in the script, if I push two files to the printer at once -- lp a b -- then "a" makes it thru ux2dos and looks OK when it get laid on paper, while "b" does *not* get run thru the ux2dos filter and&lt;BR /&gt;gets printed in "stair-step"&lt;BR /&gt;mode.&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2002 13:21:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769181#M939444</guid>
      <dc:creator>Mike Reaser</dc:creator>
      <dc:date>2002-07-22T13:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769182#M939445</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;Try these links,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;docId=200000060581545" target="_blank"&gt;http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;docId=200000060581545&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;docId=200000059833057" target="_blank"&gt;http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;docId=200000059833057&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2002 13:25:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769182#M939445</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2002-07-22T13:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769183#M939446</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;It is always 1 file.&lt;BR /&gt;&lt;BR /&gt;See this remote print&lt;BR /&gt;&lt;BR /&gt;# lp -dtester *&lt;BR /&gt;request id is tester-4218 (4 files)&lt;BR /&gt;# cat /tmp/testres&lt;BR /&gt;/usr/sbin/rlp -Itester-4218 -J/nff /var/spool/lp/request/tester/dA4218xantia&lt;BR /&gt;&lt;BR /&gt;It makes a data file of all inputs and sends that.&lt;BR /&gt;&lt;BR /&gt;If you have a problem then you need to make an ordinary printer which handles multiple files on a false name and in that script do a print file by file to the real printer.&lt;BR /&gt;&lt;BR /&gt;             Steve Steel</description>
      <pubDate>Mon, 22 Jul 2002 13:41:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769183#M939446</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-07-22T13:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769184#M939447</link>
      <description>Thanks to everyone for the contributions and suggestions!&lt;BR /&gt;&lt;BR /&gt;I decided to turn the problem "on its side", and instead of trying to beat myself up to get ux2dos integrated into the interface script, wrote a wrapper for the "lp" command which will push files thru ux2dos when appropriate.  &lt;BR /&gt;&lt;BR /&gt;The wrapper is attached, for anyone curious about it.</description>
      <pubDate>Mon, 22 Jul 2002 18:09:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769184#M939447</guid>
      <dc:creator>Mike Reaser</dc:creator>
      <dc:date>2002-07-22T18:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769185#M939448</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;Have you tried with the Script dumbplot_printer_cr , with carrige return option? You can try with that.&lt;BR /&gt;&lt;BR /&gt;Sandip</description>
      <pubDate>Mon, 22 Jul 2002 18:42:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769185#M939448</guid>
      <dc:creator>Sandip Ghosh</dc:creator>
      <dc:date>2002-07-22T18:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769186#M939449</link>
      <description>Actually, Steve, all the files are treated together in a single job (passed along as parameters $6 and on). I determined this by disabling a queue, printing multiple files at once, and finding one control file and several datafiles in the request directory (/var/spool/lp/request/&lt;QUEUE&gt;).&lt;BR /&gt;&lt;BR /&gt;(Realizing this for the first time, I now have modify my own scripts to properly iterate through a list if a user decides to print more than one file at a time.)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So Mike, even though rlp takes only one file parameter, it actually will process the remaining data files for the job.&lt;BR /&gt;&lt;BR /&gt;Try this between the shifts and rlp:&lt;BR /&gt;&lt;BR /&gt;shift; shift; shift; shift; shift&lt;BR /&gt;for f in $@&lt;BR /&gt;do&lt;BR /&gt;        ux2dos $f &amp;gt; $f.tmp&lt;BR /&gt;        mv -f $f.tmp $f&lt;BR /&gt;done&lt;BR /&gt;/usr/sbin/rlp ...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/QUEUE&gt;</description>
      <pubDate>Mon, 22 Jul 2002 18:47:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769186#M939449</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2002-07-22T18:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769187#M939450</link>
      <description>Jordan -- Thank you, thank you, thank you!  I was close on my previous attempt to sit in a loop and 'moosh' the files to be printed.  &lt;BR /&gt;&lt;BR /&gt;Your suggestion "did the trick" and now my Oce printer will happily print straight down the left side of the page instead of "stair-stepping".&lt;BR /&gt;&lt;BR /&gt;Thanks again!</description>
      <pubDate>Tue, 23 Jul 2002 17:48:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769187#M939450</guid>
      <dc:creator>Mike Reaser</dc:creator>
      <dc:date>2002-07-23T17:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769188#M939451</link>
      <description>My pleasure, Mike. By the way, what model Oce are you using? I'm deveping an interface script to prepend FOL JEC headers for our Oce 8430. I'll post a copy if you're interested.</description>
      <pubDate>Tue, 23 Jul 2002 20:14:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769188#M939451</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2002-07-23T20:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769189#M939452</link>
      <description>Not that it makes any difference now, but 8430 is our Symmetrix model number. The Oce model is 8465. Just thought I'd let you know in case it seemed confusing.</description>
      <pubDate>Tue, 23 Jul 2002 22:15:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769189#M939452</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2002-07-23T22:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Interface Script for Remote Printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769190#M939453</link>
      <description>&lt;BR /&gt;I promised to post our interface script for the Oce 8400 series. It supports PCL5 and PostScript options if desired. Please respond with any problems or enhancements.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Sep 2002 14:31:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-interface-script-for-remote-printer/m-p/2769190#M939453</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2002-09-12T14:31:37Z</dc:date>
    </item>
  </channel>
</rss>

