Answer the question
In order to leave comments, you need to log in
How to pass a variable from one sh file to another with sending via ssh?
I pass certain parameters on the command line, they are in the sh file, I need to transfer a variable from one sh file to another sh file and send the second file to the server and work with this variable from the file there.
How to do it?
sh-shnik is transferred in this way:
sshpass -p $PASS ssh $USR@$IP -p $PORT '/opt/deploy.sh'
./install-to-host.sh -u root -p test -mip 192.168.4.95 -nn master-1 -port 8888
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question