This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
FILE=hoge.conf | |
LOCAL_DIR=/home/hoge/work/hoge | |
REMOTE_DIR=/etc/hoged | |
REMOTE_USER=hoge | |
REMOTE_HOSTS="hoge1 hoge2 hoge3 hoge4" | |
for REMOTE_HOST in $REMOTE_HOSTS | |
do | |
CMD="scp ${LOCAL_DIR}/${FILE} ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_DIR}/${FILE}" | |
echo $CMD |