- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Report to two printers via 'lp'?
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
Discussions
Discussions
Discussions
Forums
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
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
тАО10-15-2002 11:52 AM
тАО10-15-2002 11:52 AM
Weird, but they want it!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 12:03 PM
тАО10-15-2002 12:03 PM
SolutionThis question came up a few weeks ago. There were a couple of good answers, but the poster decided to use the 'tee' command to shoot the job to two printers at once.
JP
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x6ad0a848deccd61190050090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 12:07 PM
тАО10-15-2002 12:07 PM
Re: Report to two printers via 'lp'?
(e.g. lp.sh) that parses the command line and sends multiple -d arguments to separate lp commands. It gets more difficult if you have to read stdin. In that case you would have to read stdin into a temp file and then send the temp file to the multiple lp commands and finally remove the temp file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 01:51 PM
тАО10-15-2002 01:51 PM
Re: Report to two printers via 'lp'?
alias P1 ">lp -dlp1 -s 2>/dev/null"
There doesn't seem a workable way to use the tee command.
I also tried Jeff Schussele's approach (create a third printer that points to both p1 and p2), but I couldn't find any references to the printers -- Jeff's were remote printers mine are networked printers.
Any further suggestions would be greatly appreciated.
Brad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 02:31 PM
тАО10-15-2002 02:31 PM
Re: Report to two printers via 'lp'?
Try this.
Set up that "third" printer as a remote printer for example call it new_ptr_name. Specify either of the actual IPs/queunames used by the JetDirect cards.
Doesn't really matter if you have either of those correct....because....
You're going to edit the /etc/lp/interface/new_ptr_name file &
1) Replace the /usr/sbin/rlp command line with a lp -dlp1 $1 command
2) Add a second lp command lp -dlp2 $1
Then whenever a lp -dnew_ptr_name request is made this script is executed & should produce output on both printers. I haven't tried this as I don't have HPPI to play with...but in theory this should work.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 02:56 PM
тАО10-15-2002 02:56 PM
Re: Report to two printers via 'lp'?
I have attached the /etc/lp/interface/ file. If anyone would like to indicate where in the script I can do what Jeff proposes, I would be greatful.
Thanks,
Brad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 03:11 PM
тАО10-15-2002 03:11 PM
Re: Report to two printers via 'lp'?
But check to see if you have this file
/usr/lib/lp/model/rmodel
This is the default remote printer model.
If so copy it into /etc/lp/interface & give it the new_ptr_name as a filename THEN you can edit it as I earlier mentioned.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 03:31 PM
тАО10-15-2002 03:31 PM
Re: Report to two printers via 'lp'?
Sorry if I have led you down the wrong path. The printer is not a remote printer; simply a local printer on the network and created via hppi using it's ip address. I guess that's why I'm getting the interface script that I am.
What say U?
Thanks again & again.
Brad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 03:47 PM
тАО10-15-2002 03:47 PM
Re: Report to two printers via 'lp'?
Just remove that "third" network printer & go into SAM to create the new remote printer.
Printers and Plotters -> LP Spooler -> Printers and Plotters -> Actions -> Add Remote Printer/Plotter
For Printer Name => whatever you want it to be known locally
Remote System Name => Give it any IP (Doesn't matter - nothing will be going to "it" anyway)
Remote Printer Name => Give it any name (Again doesn't matter)
Then click ok.
NOW when you check /etc/lp/interface, you should see the proper model script named for that ptr & just edit that as above & test with a normal lp -dnew_ptr_name /path/to/ascii/file & see if you don't get output on both printers.
One caveat - remote printer requests go out raw - with a LF only. You may need to set the ptr(s) to append CR to LF in the Printing Menu to avoid the output "stair stepping" right off the page.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 03:56 PM
тАО10-15-2002 03:56 PM
Re: Report to two printers via 'lp'?
Jeff