<?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 LPSTAT -U in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/lpstat-u/m-p/3858261#M737249</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I’m trying to build the function of canceling Unix’s print jobs from my application as follows:&lt;BR /&gt;&lt;BR /&gt;From my application, use the lpstat –u command to list out the currently lined-up print jobs (by user) &amp;amp; dump the result onto a text file &lt;BR /&gt;Then the application will read the text file to determine the print jobs’ IDs so that these IDs can be displayed out to the end user for selection (to select which Jobs to cancel) &lt;BR /&gt;The problem is that in HP-UX 11.23, the results generated by the lpstat –u command are different from HP-UX 11.0 &amp;amp; 11i; the followings are the examples:   &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;In HP-UX 11.0:&lt;BR /&gt;&lt;BR /&gt;# lpstat -uong&lt;BR /&gt;&lt;BR /&gt;axis_p1_pr1-8932    ong            priority 0  Aug 21 14:24 on axis_p1_pr1&lt;BR /&gt;&lt;BR /&gt;        (standard input)                         2726 bytes&lt;BR /&gt;&lt;BR /&gt;axis_p1_pr1-8933    ong            priority 0  Aug 21 14:24 on axis_p1_pr1&lt;BR /&gt;&lt;BR /&gt;        (standard input)                         2726 bytes&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;In HP-UX 11.23:&lt;BR /&gt;&lt;BR /&gt;# lpstat -uong&lt;BR /&gt;&lt;BR /&gt;cps1_pr4-2          ong            priority 0  Aug 21 15:05 on cps1_pr4&lt;BR /&gt;&lt;BR /&gt;        (standard input)                         2743 bytes&lt;BR /&gt;&lt;BR /&gt;        (standard input)                         2743 bytes&lt;BR /&gt;&lt;BR /&gt;cps1_pr4-3          ong            priority 0  Aug 21 15:05&lt;BR /&gt;&lt;BR /&gt;        (standard input)                         2742 bytes&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;printer queue for cps1_pr4&lt;BR /&gt;&lt;BR /&gt;no entries&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;demo: sending to 128.0.0.3&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;You can see that in HP-UX 11.0, it only listed out the job ID + another line for the size of the print job; I can just simply take the first line to get the job ID &amp;amp; ignore the second line, take the third line &amp;amp; ignore the fourth line, and soon…! &lt;BR /&gt;&lt;BR /&gt;However, in HP-UX 11.23, it actually listed out more information, like 2 lines for the size of the print job + some other additional detail lines at the end of the listing; this make me hard to determine which is the job ID and which is not, especially when I have more than 1 print jobs lined-up in the spooler! I have tried to use some other options like lpstat &amp;amp; lpstat –o, but they still give me the same additional detail lines! &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;Thus, I would like to seek for your advice on how to generate a simple list just like what the HP-UX 11.0 does! My e-mail address is kychui@patimas.com&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Chui&lt;BR /&gt;</description>
    <pubDate>Thu, 07 Sep 2006 04:25:42 GMT</pubDate>
    <dc:creator>Chui Kock You_1</dc:creator>
    <dc:date>2006-09-07T04:25:42Z</dc:date>
    <item>
      <title>LPSTAT -U</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lpstat-u/m-p/3858261#M737249</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I’m trying to build the function of canceling Unix’s print jobs from my application as follows:&lt;BR /&gt;&lt;BR /&gt;From my application, use the lpstat –u command to list out the currently lined-up print jobs (by user) &amp;amp; dump the result onto a text file &lt;BR /&gt;Then the application will read the text file to determine the print jobs’ IDs so that these IDs can be displayed out to the end user for selection (to select which Jobs to cancel) &lt;BR /&gt;The problem is that in HP-UX 11.23, the results generated by the lpstat –u command are different from HP-UX 11.0 &amp;amp; 11i; the followings are the examples:   &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;In HP-UX 11.0:&lt;BR /&gt;&lt;BR /&gt;# lpstat -uong&lt;BR /&gt;&lt;BR /&gt;axis_p1_pr1-8932    ong            priority 0  Aug 21 14:24 on axis_p1_pr1&lt;BR /&gt;&lt;BR /&gt;        (standard input)                         2726 bytes&lt;BR /&gt;&lt;BR /&gt;axis_p1_pr1-8933    ong            priority 0  Aug 21 14:24 on axis_p1_pr1&lt;BR /&gt;&lt;BR /&gt;        (standard input)                         2726 bytes&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;In HP-UX 11.23:&lt;BR /&gt;&lt;BR /&gt;# lpstat -uong&lt;BR /&gt;&lt;BR /&gt;cps1_pr4-2          ong            priority 0  Aug 21 15:05 on cps1_pr4&lt;BR /&gt;&lt;BR /&gt;        (standard input)                         2743 bytes&lt;BR /&gt;&lt;BR /&gt;        (standard input)                         2743 bytes&lt;BR /&gt;&lt;BR /&gt;cps1_pr4-3          ong            priority 0  Aug 21 15:05&lt;BR /&gt;&lt;BR /&gt;        (standard input)                         2742 bytes&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;printer queue for cps1_pr4&lt;BR /&gt;&lt;BR /&gt;no entries&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;demo: sending to 128.0.0.3&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;You can see that in HP-UX 11.0, it only listed out the job ID + another line for the size of the print job; I can just simply take the first line to get the job ID &amp;amp; ignore the second line, take the third line &amp;amp; ignore the fourth line, and soon…! &lt;BR /&gt;&lt;BR /&gt;However, in HP-UX 11.23, it actually listed out more information, like 2 lines for the size of the print job + some other additional detail lines at the end of the listing; this make me hard to determine which is the job ID and which is not, especially when I have more than 1 print jobs lined-up in the spooler! I have tried to use some other options like lpstat &amp;amp; lpstat –o, but they still give me the same additional detail lines! &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;Thus, I would like to seek for your advice on how to generate a simple list just like what the HP-UX 11.0 does! My e-mail address is kychui@patimas.com&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Chui&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Sep 2006 04:25:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lpstat-u/m-p/3858261#M737249</guid>
      <dc:creator>Chui Kock You_1</dc:creator>
      <dc:date>2006-09-07T04:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: LPSTAT -U</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lpstat-u/m-p/3858262#M737250</link>
      <description>It appears this is a simple matter of scripting.  You either can built up a complex state machine in awk or see if you can analyze what lines you do and don't want.&lt;BR /&gt;&lt;BR /&gt;You could remove lines with "bytes".  Or better yet only select lines with "-" followed by "priority":&lt;BR /&gt;$ lpstat -uong | grep "-.* priority"&lt;BR /&gt;&lt;BR /&gt;If you want only the IDs, you can pipe it to awk:&lt;BR /&gt;$ ... | awk '{print $1}'&lt;BR /&gt;&lt;BR /&gt;You do know of course that cancel(1) takes a -u option?  (But you said you wanted to give your users a choice.)</description>
      <pubDate>Sun, 26 Aug 2007 04:20:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lpstat-u/m-p/3858262#M737250</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-08-26T04:20:48Z</dc:date>
    </item>
  </channel>
</rss>

