![]() |
BASH shell script help
I want to make shell script that takes a list of host names on my network as command line arguments and displays whether the hosts are up or down, using the ping command to display the status of a host and a for loop to process all the host names. Im new to shell scripting so Im not quite sure where to start with this. Thanks for any help -E
|
Re: BASH shell script help
Quote:
Cheers, Tink P.S.: I'm new at driving, could you go to the supermarket for me? :D |
Thanks for nothing
Actually I was hoping for a push in the right direction. I got a link form a post at another forum http://www.tldp.org/LDP/abs/html/index.html this is good help.
-E PS Thanks for wasting my time |
please do not double post messages.... did you not have time to read the terms of using this site?
http://www.linuxquestions.org/questi...threadid=21568 |
Non-*NIX Forums
I saw that this was a non-*nix forum, and I had a Unix question. My bad, wont happen again. -E :(
|
Re: Thanks for nothing
Quote:
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html Cheers, Tink |
Like that do ya?
Just a little busy, clients from hell with spineless project managment... My bad. Thanks for your help though, I pretty much got it sorted out. -E
|
Try this baby johnny:
#!/bin/sh for i in $@ do ping $i >> /my/log/file done # EOF All you have to do is read regularly the log. Or mail it for U. HTH, vfs |
Forgot to put this in the code: Try learning ping options (which I don't know) to ping once or for a predetermined time, or you'll end with a big log of nothing...
sorry, vfs |
| All times are GMT -5. The time now is 06:02 AM. |