Simple Shell Script Help

Soldato
Joined
27 Aug 2004
Posts
2,955
Location
Singapore ExPat
Hey guys, I need a hand with a simple shell script (bash). I have a file that contains a list of servers each on a separate line, what I want to do is use each hostname as a variable to log into, create a directory, exit and repeat. Now I gather I probably need to use a while loop or for loop but am not sure of the correct way to get the hostnames into an array? Do I need to cat it?
Any pointers much appreciated.
 
Back
Top Bottom