[atguigu@hadoop102 bin]$ vim xcall.sh
#! /bin/bash for i in hadoop102 hadoop103 hadoop104 do echo --------- $i ---------- ssh $i "$*" done
chmod 777 xcall.sh
xcall.sh jps
[atguigu@hadoop102 bin]$ vim xcall.sh
#! /bin/bash for i in hadoop102 hadoop103 hadoop104 do echo --------- $i ---------- ssh $i "$*" done
chmod 777 xcall.sh
xcall.sh jps