- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- lp queue duplication
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
02-24-2003 08:39 AM
02-24-2003 08:39 AM
The only thing I can come up with is renaming the lp command and writing a shell script in the place of lp that just checks looks for the destination and lp's it to the additional destination if it's a match.
I would prefer not to do this if there is a better way.
Any suggestions?
Thanks,
Dave Parker
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 08:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 08:49 AM
02-24-2003 08:49 AM
Re: lp queue duplication
Setup a printer class spool by including more than one printer to this class. When you print to the class it'll be printed to whatever printer you have defined in that class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 08:49 AM
02-24-2003 08:49 AM
Re: lp queue duplication
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 09:00 AM
02-24-2003 09:00 AM
Re: lp queue duplication
I had considered the tee command, but I cannot change the lp commands issues as there are thousands of them embedded in programs and scripts. Also, many reports originate on other systems (NT & AS/400).
I think that modifying the interface file sounds like a good option. I am presuming I just need to capture the option specified and re-lp it with thos options to my other destination?
Thanks,
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 09:31 AM
02-24-2003 09:31 AM
Re: lp queue duplication
$1 - Printer Name
$2 - Request ID
$3 - User
$4 - Title (optional - may be "-")
$5 - Number of copies
$6 - options
The remaining args are the pathnames of the files to print. You should probably make copies of these files early in the process because the originals will be removed when the print job is finsished.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2003 09:43 AM
02-24-2003 09:43 AM
Re: lp queue duplication
What about of create you own lp script file. i.e:
#vi mylp
#$1: main queue
#$2: second queue
#$3: file
#Define any lp options.i.e:
#OPTIONS="-onb -oc -olandscape"
OPTIONS=""
if [ $# -ne 3 ]
then
echo "Usage: $0
exit 99
fi
if [ ! -d /var/spool/lp/request/$1 ]
the
echo "Error: $1 is not a valid queue"
exit 98
fi
if [ ! -d /var/spool/lp/request/$2 ]
the
echo "Error: $2 is not a valid queue"
exit 98
fi
if [ ! -f $3 ]
the
echo "Error: $1 file not found"
exit 98
fi
lp -d$1 $OPTIONS $3
lp -d$2 $OPTIONS $3
Rgds.