- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- loop or continue
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
05-01-2007 05:14 AM
05-01-2007 05:14 AM
I know this is so easy for you..
What is the command to get the result by 5seconds or if i press the enter key
exmple: I want to monitor the print queue every 5 seconds.
lpstat -a pintername
How do i do that instead typing the command again.
Apprecaite your help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2007 05:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2007 05:17 AM
05-01-2007 05:17 AM
Re: loop or continue
# while true; do
> lpstat -a printername
> sleep 5
> done
Using a Ctrl-C will interrupt (terminate) the loop.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2007 05:17 AM
05-01-2007 05:17 AM
Re: loop or continue
lpstat -a printername
echo "full_path_of_myscript" |at now +5 minutes
The invoke that script with "echo "full_path_of_myscript" |at now +5 minutes"
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2007 05:30 AM
05-01-2007 05:30 AM
Re: loop or continue
the triggy part is
>>
or if I press the enter key
<<
A solution - which is HP specific - is the command
line -t 5
(the -t option is only available under HP-UX):
while :
do
dummy=$(line -t 5)
lpstat -a printer
done
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2007 06:17 AM
05-01-2007 06:17 AM
Re: loop or continue
Thank you so much for the hint It really helps.
more power to all of you guys:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2007 06:19 AM
05-01-2007 06:19 AM
Re: loop or continue
Thank you so much for all your reply. It really help me a lot it so much easier now.
more power to all of you guys:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2007 06:33 AM
05-01-2007 06:33 AM
Re: loop or continue
do
echo "Press Enter"
read
lpstat -a printer
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2007 09:39 AM
05-01-2007 09:39 AM