标签:http 软连接 tput syn taf alt done att dia
/usr/local/bin
sudo nano .hosts
s101
s102
s103
s104
s105
xcall.sh
#!/bin/bash for host in `cat /usr/local/bin/.hosts` ; do tput setaf 2 echo ======== $host ======== tput setaf 7 ssh $host "source /etc/profile;$@" done
#!/bin/bash name=`whoami` # 指定文件所在文件夹名称 dir=`dirname $1` # 指定文件的文件名 filename=`basename $1` # 进入到dir中 cd $dir # 得到当前目录的绝对路径 fullpath=`pwd` for((i=102 ; i<=105; i++)) ; do tput setaf 2 echo ==================== s$i $@ =================== tput setaf 9 rsync -lr $filename "$name"@s"$i":$fullpath done
记得给文件执行权限 chmod 777 xcall.sh
标签:http 软连接 tput syn taf alt done att dia
原文地址:https://www.cnblogs.com/star521/p/10241047.html