[root@node-etl-01 bin]# pwd
/root/bin
[root@node-etl-01 bin]# touch xcall
[root@node-etl-01 bin]# cat xcall
#! /bin/bash
for((host=1; host<=3; host++))
do
echo --------- node-etl-0$host ----------
ssh node-etl-0$host "$*"
done
[root@node-etl-01 bin]# chmod 777 xcall
[root@node-etl-01 bin]# xcall ls
--------- node-etl-01 ----------
anaconda-ks.cfg
authorized_keys
bin
--------- node-etl-02 ----------
anaconda-ks.cfg
authorized_keys
bin
--------- node-etl-03 ----------
anaconda-ks.cfg
authorized_keys
bin