Need help with a basic script
I have a text file that has 1 server per line listed in it. I need writting a script that will ping each server and report back if it is up or not.
Any help is appreciated. Thank You. |
Code:
for HOST in `cat hostlist` Note that the characters in the first line are back ticks rather than apostrophes. |
You want something like this:
Code:
IFS=' Also, xargs might be useful as an alternate to the for loop. |
Thanks!
Quote:
Thanks to both of you. It looks so simple, I just haven't gotten my arms around scripting yet! |
Have a look at Advanced Bash Scripting guide, at http://www.tldp.org/LDP/abs/html/.
|
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
|
All times are GMT -5. The time now is 09:16 PM. |