- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- Re: How to make Script in HP-UX 11i.23
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP