I have a question about automating the execution of a shell script that prompts the user for parameters. Usually for shells I would use the action [run command line], but I'm not sure how to use it when the shell I want to execute does something like this :
and then I get the following menu :
Choose the task you want to perform :  Deploy APP initially Deploy APP incrementally Exit
how can I model this in RA?
Did you check this thread?
Tech Tip:How to run interactive command line
Thanks for the answer. To clarify : so it would be correct to do something like this? :
1 . User input action to get parameter_A
2. User input action to get parameter_B
3. Run command line using echo with parameter_A and parameter_B
Someone here might know of a syntax that will get you the result you're looking for. If not then it might mean that you need to modify the script slightly to assign the variables to the arguments being passed to the script.
I just tested this on a linux system within a bash shell. You can have a script with two read statements (read is one way to prompt a user for input inside of a script). For example, my bash script:
read -a VAR1 -p "var one: "echo var1=$VAR1
read -a VAR2 -p "var two: "echo var2=$VAR2
But I have been unable to find a command that echo's both values into the script and have the script recognize them as values for each one of those read prompts. It seems like it takes a value for the first var and exits with no data for the second var:
Two of the few commands I used. Note: Also, values with spaces do not seem to be fully assigned to var1.
echo "abc" "tes" | ./testReads.sh
./testReads.sh < <(echo "abc tes")
Example of script that assigns the variables to the arguments being passed to the script:
echo hi VAR1=$1 VAR2=$2 echo var1=$VAR1 echo var2=$VAR2
Then execute with:
./testReads2.sh "this is one" "this is two"