GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need some help for scripting
Operating System - HP-UX
1846747
Members
5897
Online
110256
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
11-06-2002 11:22 AM
11-06-2002 11:22 AM
I need to send some specific files to approximately 70 printers. Can any one please guide me to write the script for that?
Sandip
Sandip
Good Luck!!!
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2002 11:20 AM
11-06-2002 11:20 AM
Solution
Hi,
Here is one try at it:
#!/bin/sh
PRINTERS="prt1 prt2 prt3"
MYFILES="myfile1 myfile2 myfile3"
for f in $MYFILES
do
for p in $PRINTERS
do
lp -d${p} $f
done
done
Since you have 70 printers, you could put them into a text file, call it PRINTERS, with a line for each printer name. Then you can pull that into a variable for the printer name like this:
PRINTERS=$(
and replace the PRINTERS= line in the script with that.
JP
Here is one try at it:
#!/bin/sh
PRINTERS="prt1 prt2 prt3"
MYFILES="myfile1 myfile2 myfile3"
for f in $MYFILES
do
for p in $PRINTERS
do
lp -d${p} $f
done
done
Since you have 70 printers, you could put them into a text file, call it PRINTERS, with a line for each printer name. Then you can pull that into a variable for the printer name like this:
PRINTERS=$(
and replace the PRINTERS= line in the script with that.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2002 01:13 PM
11-06-2002 01:13 PM
Re: Need some help for scripting
Hi
A variant to John's script.
Send all files to the printers in one request:
#!/bin/sh
PRINTERS="prt1 prt2 prt3"
MYFILES="myfile1 myfile2 myfile3"
for p in $PRINTERS
do
lp -d${p} $MYFILES
done
With this you should have fever print requests running.
A variant to John's script.
Send all files to the printers in one request:
#!/bin/sh
PRINTERS="prt1 prt2 prt3"
MYFILES="myfile1 myfile2 myfile3"
for p in $PRINTERS
do
lp -d${p} $MYFILES
done
With this you should have fever print requests running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2002 01:31 PM
11-06-2002 01:31 PM
Re: Need some help for scripting
Actually these are label printers and the most interesting is that if you send the label formats simultaneously it can't digest. So I have to give a "sleep 10" in between two format.
Anyway thanks to all of you.
Sandip
Anyway thanks to all of you.
Sandip
Good Luck!!!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP