Running a command with input from a file.
Here's what I'm trying to do:
I have a backup server in my network that has passwordless ssh connection to all the servers in the network. I have a script called "load_checker.sh" that I wanna use to monitor the load on all the servers. Now, I wanna copy load_checker.sh to all of the servers in the network.
I have a list of all of the servers in the network, so to make my job easier, it would be alot faster if I could just run the following command from the backup server:
scp load_checker.sh user@$serverlist:/some/directory/load_checker.sh
The variable $serverlist will be all of the servers that are listed in the serverlist file. That way, load_checker.sh will be sent to every server that's listed on the file. The serverlist file will have each server separated by a line, example:
So as you guys may have noticed, I know the concept what needs to be done, but I just don't know what I have to do.
Conclusion: What would be the best way to scp load_checker.sh to all of the servers that are listed in the serverlist file?
|Thread||Thread Starter||Forum||Replies||Last Post|
|Input foreign characters under X11||Beastie||General software and network||5||30th August 2009 11:51 AM|
|Command to find and replace, but not creating a new file||18Googol2||Programming||4||22nd September 2008 10:28 PM|
|how to enable file/command completion for ksh93?||TerryP||General software and network||1||31st August 2008 08:23 AM|
|C and file input/output||18Googol2||Programming||3||20th August 2008 04:02 PM|
|shell script with input||c0mrade||Programming||5||13th July 2008 04:33 AM|