一、shell中调用shell的三种方式:
方法一:使用source
#!/bin/bash
source invoked.sh
方法二:使用.
#!/bin/bash
. invoked.sh
方法三:使用sh
#!/bin/bash
sh invoked.sh
二、使用pssh等并行shell进行分布式系统维护:
# ./pssh -h -l
eg: ./pssh -h ../multi_dc_1_12.host -l root /home/icefeish/stop_cassandra.sh
#cat multi_dc_1_12.host
--
192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4
[@more@]
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23937368/viewspace-1055632/
,如需转载,请注明出处,否则将追究法律责任。