<?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: Form Feeds, /etc/lp/interface/model.orig, and SED in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766111#M894740</link>
    <description>I think you need to echo a ^L after the "done" loop and before "exit 0".&lt;BR /&gt;This should push out the final page.</description>
    <pubDate>Wed, 17 Jul 2002 13:01:03 GMT</pubDate>
    <dc:creator>Rich Wright</dc:creator>
    <dc:date>2002-07-17T13:01:03Z</dc:date>
    <item>
      <title>Form Feeds, /etc/lp/interface/model.orig, and SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766110#M894739</link>
      <description>Hey everyone I'm currently trying to fix an issue with a printer which in the firm wear only prints when receiving ^L aka \014\c aka Form feed.  I've added echo "\014\c" to my /etc/lp/interface/model.orig file for that printer, and this only helps with printing one page, if the document is multiple pages, it just cuts it off after the first page (which is 26 lines with this printer)  I've also tried using sed with my model.orig file looking like so...&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;# Source: /users/hpnp/odyssey/repository/sh/dumbplot.psh&lt;BR /&gt;# @(#)B.11.11_LR&lt;BR /&gt;#&lt;BR /&gt;# lp interface for dumb plotter&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;copies=$4&lt;BR /&gt;&lt;BR /&gt;# Handle disable and cancel traps&lt;BR /&gt;trap "trap 15;kill -15 0;exit 0" 15&lt;BR /&gt;&lt;BR /&gt;# The remaining arguments are files&lt;BR /&gt;&lt;BR /&gt;shift; shift; shift; shift; shift&lt;BR /&gt;files="$*"&lt;BR /&gt;&lt;BR /&gt;# Plot the spooled files&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;i=1&lt;BR /&gt;while [ $i -le $copies ]&lt;BR /&gt;do&lt;BR /&gt;  for file in $files&lt;BR /&gt;  do&lt;BR /&gt;  #send the file to sed, and&lt;BR /&gt;  # 1) remove the ~^L from the first line.&lt;BR /&gt;  # 2) remove ^L that are on lines by themselves&lt;BR /&gt;  # 3) replace any ~^L with a single ^L from any other lines.&lt;BR /&gt;  #    These tend to be the headers from Multiple Transactions.&lt;BR /&gt;  # 4) Insert a ^L (form feed) on the "Continuation voucher"&lt;BR /&gt;  #    lines.&lt;BR /&gt;  #&lt;BR /&gt;  # Finally, add a ^L to the end of the file.&lt;BR /&gt;&lt;BR /&gt; cat "$file" 2&amp;gt;&amp;amp;1 | sed '&lt;BR /&gt; 1s/~^L//p&lt;BR /&gt; s/^L$//&lt;BR /&gt; s/~^L/^L/&lt;BR /&gt; s/^Contin/^LContin/&lt;BR /&gt; $s/^/^L/p'&lt;BR /&gt; done&lt;BR /&gt; i=`expr $i + 1`&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;&lt;BR /&gt;This however doesn't work, and if I'm doing something wrong I can't figure it out.  Also if anyone has any idea on how to approach this issue for a different angle I'd really appreciate some help.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;&lt;BR /&gt;J-T</description>
      <pubDate>Wed, 17 Jul 2002 12:42:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766110#M894739</guid>
      <dc:creator>John-Thomas Gaietto</dc:creator>
      <dc:date>2002-07-17T12:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Form Feeds, /etc/lp/interface/model.orig, and SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766111#M894740</link>
      <description>I think you need to echo a ^L after the "done" loop and before "exit 0".&lt;BR /&gt;This should push out the final page.</description>
      <pubDate>Wed, 17 Jul 2002 13:01:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766111#M894740</guid>
      <dc:creator>Rich Wright</dc:creator>
      <dc:date>2002-07-17T13:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Form Feeds, /etc/lp/interface/model.orig, and SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766112#M894741</link>
      <description>Also for debugging, redirect the output of "cat" to a file. Then look at it with xd or a binary editor.&lt;BR /&gt;I don't use sed that way. &lt;BR /&gt;I will use &lt;BR /&gt;sed -e 's/x/y/' -e 's/a/b/' ...&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Jul 2002 13:07:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766112#M894741</guid>
      <dc:creator>Rich Wright</dc:creator>
      <dc:date>2002-07-17T13:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Form Feeds, /etc/lp/interface/model.orig, and SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766113#M894742</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;What are you printing on . &lt;BR /&gt;&lt;BR /&gt;This is how I split a file into 60 line chunks to print.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;file=$1&lt;BR /&gt;let length=`cat $file|wc -l`&lt;BR /&gt;let start=1&lt;BR /&gt;let x=0&lt;BR /&gt;q=""&lt;BR /&gt;  while [ "$start" -le "$length" ]&lt;BR /&gt;  do&lt;BR /&gt;    let x=$x+1&lt;BR /&gt;    tail -n +$start $file|head -n 60 &amp;gt; /tmp/printfax$x&lt;BR /&gt;    let start=$start+60&lt;BR /&gt;    q=$q" "/tmp/printfax$x&lt;BR /&gt;  done&lt;BR /&gt;lp -dbelgo161 $q&lt;BR /&gt;/bin/rm /tmp/printfax*&lt;BR /&gt;&lt;BR /&gt;                  Steve Steel</description>
      <pubDate>Wed, 17 Jul 2002 13:47:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766113#M894742</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-07-17T13:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Form Feeds, /etc/lp/interface/model.orig, and SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766114#M894743</link>
      <description>(I'm not quite sure what you mean from)  But i'm printing from lp.  See there is a program that makes an LP call to a specified printer to print a report.  The printer will print however if I print lp -d &lt;PRINTER&gt; &lt;FILE with="" more="" than="" 26="" lines=""&gt; I want it to print the file, insert the FF after 26 lines, then print to the next page. With out having to run the print job through another script, because the application won't allow me to do that.&lt;BR /&gt;&lt;/FILE&gt;&lt;/PRINTER&gt;</description>
      <pubDate>Wed, 17 Jul 2002 16:48:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/form-feeds-etc-lp-interface-model-orig-and-sed/m-p/2766114#M894743</guid>
      <dc:creator>John-Thomas Gaietto</dc:creator>
      <dc:date>2002-07-17T16:48:45Z</dc:date>
    </item>
  </channel>
</rss>

