一、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@]
方法一:使用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博客 ” ,链接:http://blog.itpub.net/23937368/viewspace-1055632/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23937368/viewspace-1055632/
Shell调用与并行shell分布式维护
本文详细介绍了shell中调用shell的三种方式,并阐述了如何利用pssh等并行shell工具进行分布式系统的维护操作。
2136

被折叠的 条评论
为什么被折叠?



