- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Form Feeds, /etc/lp/interface/model.orig, and SED
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2002 05:42 AM
07-17-2002 05:42 AM
Form Feeds, /etc/lp/interface/model.orig, and SED
------------------------------
#!/usr/bin/sh
# Source: /users/hpnp/odyssey/repository/sh/dumbplot.psh
# @(#)B.11.11_LR
#
# lp interface for dumb plotter
#
copies=$4
# Handle disable and cancel traps
trap "trap 15;kill -15 0;exit 0" 15
# The remaining arguments are files
shift; shift; shift; shift; shift
files="$*"
# Plot the spooled files
i=1
while [ $i -le $copies ]
do
for file in $files
do
#send the file to sed, and
# 1) remove the ~^L from the first line.
# 2) remove ^L that are on lines by themselves
# 3) replace any ~^L with a single ^L from any other lines.
# These tend to be the headers from Multiple Transactions.
# 4) Insert a ^L (form feed) on the "Continuation voucher"
# lines.
#
# Finally, add a ^L to the end of the file.
cat "$file" 2>&1 | sed '
1s/~^L//p
s/^L$//
s/~^L/^L/
s/^Contin/^LContin/
$s/^/^L/p'
done
i=`expr $i + 1`
done
exit 0
------------------------------
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.
Thanks in advance,
J-T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2002 06:01 AM
07-17-2002 06:01 AM
Re: Form Feeds, /etc/lp/interface/model.orig, and SED
This should push out the final page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2002 06:07 AM
07-17-2002 06:07 AM
Re: Form Feeds, /etc/lp/interface/model.orig, and SED
I don't use sed that way.
I will use
sed -e 's/x/y/' -e 's/a/b/' ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2002 06:47 AM
07-17-2002 06:47 AM
Re: Form Feeds, /etc/lp/interface/model.orig, and SED
What are you printing on .
This is how I split a file into 60 line chunks to print.
file=$1
let length=`cat $file|wc -l`
let start=1
let x=0
q=""
while [ "$start" -le "$length" ]
do
let x=$x+1
tail -n +$start $file|head -n 60 > /tmp/printfax$x
let start=$start+60
q=$q" "/tmp/printfax$x
done
lp -dbelgo161 $q
/bin/rm /tmp/printfax*
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2002 09:48 AM
07-17-2002 09:48 AM