此處
)折疊或打開
-
#!/bin/bash
-
-
echo "<-------------hadoop1(192.168.137.132)------------>jps"
-
ssh hadoop001 'cd ~/; source .bash_profile;' cd /app/jdk1.8.0_151/bin \; jps|sort|grep -v Jps
-
-
echo "<-------------hadoop2(192.168.137.133)------------>jps"
-
ssh hadoop002 'cd ~/; source .bash_profile;' cd /app/jdk1.8.0_151/bin \; jps|sort|grep -v Jps
-
-
echo "<-------------hadoop3(192.168.137.134)------------>jps"
-
ssh hadoop003 'cd ~/; source .bash_profile;' cd /app/jdk1.8.0_151/bin \; jps|sort|grep -v Jps
2、腳本賦予權限
chmod 775 queryJSP.sh
3、執行腳本
cd /app
./queryJSP.sh
---完---
【來自@若澤大數據】
向AI問一下細節