- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to make Script in HP-UX 11i.23
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
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
тАО04-27-2010 03:30 AM
тАО04-27-2010 03:30 AM
we have printer problem, autometic disable printer.
we have to make script to autometic run on hpux in avery 10 min, for enabling the printer.
please
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2010 03:54 AM
тАО04-27-2010 03:54 AM
Re: How to make Script in HP-UX 11i.23
You could create a crontask that runs every 10-minutes that simply does:
#!/usr/bin/sh
/usr/bin/enable printername
In fact, your 'crontab' entry could be as simple as:
0,10,20,30,40,50 * * * * /usr/bin/enable printername
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2010 05:45 AM
тАО04-27-2010 05:45 AM
Re: How to make Script in HP-UX 11i.23
maybe you need to use new jetdirect or relevant printer sofware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 04:19 AM
тАО04-28-2010 04:19 AM
Re: How to make Script in HP-UX 11i.23
please explain more because i dont know about scripting.
can we enter any Time switch?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 04:33 AM
тАО04-28-2010 04:33 AM
Re: How to make Script in HP-UX 11i.23
Try:
man crontab
manpages are real useful
HTH
SNS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 05:42 AM
тАО04-28-2010 05:42 AM
SolutionThe inittab line is:
lpe1:2345:respawn:/etc/enableprinters.sh
The script is:
COUNTER=0
while [ "$COUNTER" -lt 1 ]
do
PRINTERSTOPPED=$(lpstat -p | grep disabled | awk '{print $2}')
if [ -n "$PRINTERSTOPPED" ]
then
lpstat -l | grep disabled | /usr/bin/enable $(awk '{print $2}')
fi
sleep 320
done
It may not be perfect but it works...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 06:08 AM
тАО04-28-2010 06:08 AM
Re: How to make Script in HP-UX 11i.23
If any one face same problem, so please share the solution.
Thanks & Best Regards