w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Running script on a remote server in bash working on 1 server, not on the other

It's just a guess but i would try this

filename=hostnames
> export.log

while read -r -a line
do
    hostname=${line//"}
    echo $hostname":" >> export.log
    ssh -t -t $hostname "bash -s" < script.sh >> export.log &
done < "$filename"

exit

Just to make sure you don t get stuck on one server.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.