|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Using a list in while for server names
Hey all, been so long since I've done any KSH scriptting, I've forgotten exact sytax. 2 things,
1) I need to dot in an environment file that is a list of server names 2) I need to loop through though server names in a while loop, or until loop. Here's roughly what I have and trying to hammer out the syntax: # While not the end of the servers list, go through and copy # $1 to $2 while [[ ! EOF ]]; do scp user@server:/$1 user@server_from_list:/$2 done exit 1 $1 would be the file I want to distribute $2 is where I want it to go on the remote filesystem ie. $ ./dist .profile ~user/ This would distribute my profile to the entire list of servers in the .servers file... I'd do it by hand, but we're talking a list of 200+ servers. Thanks! JP |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Using a list in while for server names |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|