Let me explain my situation first.I have an alias in .bashrc:doscript () { ssh root@server$1 -p2202 bash -s < ~/scripts/$2 $3; }I have a script, that basically consists of several actions like:check current settingsread commentdo actionswrite $comment in a filerestart serviceSo I run a commanddoscript server scriptname parameterHowever the read comment part does not work. Instead of waiting until I enter the comment, it immediately gets executes, adding nothing to the comment file.Is there a way to enter variable in that case?
User read command while executing remote scripts over ssh
bash;ssh