- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ping-t script
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-01-2004 04:42 AM
тАО04-01-2004 04:42 AM
ping-t script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2004 04:45 AM
тАО04-01-2004 04:45 AM
Re: ping-t script
IP=$1
SECS=$2
while true
do
ping -c 1 $IP
sleep $SECS
done
---
You can add controls, but it might work...
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2004 04:57 AM
тАО04-01-2004 04:57 AM
Re: ping-t script
but can you write it without using "do" or "while".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2004 05:04 AM
тАО04-01-2004 05:04 AM
Re: ping-t script
it is ping $IP -n 1 (-c 1 must be on other system)
If you want it without while and do, just do :
alias bloup=while
aliad foo=do
bloup true
foo
ping $IP -n 1
sleep $SECS
done
here it is :)
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2004 05:09 AM
тАО04-01-2004 05:09 AM
Re: ping-t script
As Fred suggests, you will wnat this to run in some window of time and most likely not into infinity.
Thus you will want a conditional statement of some sort to limit this window.
i.e.
limit=`date +%H`
while [ $limit -lt 17 ]
do
ping 10.0.0.45 -n 5 > /tmp/ping_file
limit=`date +%H`
done
Best regards,
fl