A bash script was provided to me by a sysadmin which requires three values to be input by me. The values are read using "read" rather than read directly from the command-line.
echo "Enter value:"
read myValue
echo "Enter value 2:"
read myOtherValue
The three values I'd be entering are predictable, and I need to run this script frequently, so I would like to automate it; however, simply executing the script with the params in the command-line does not work.
./script.sh myValue myOtherValue
I can supply the first value if I echo it and then pipe it to the script, but that only works for the first param. I don't know how to pass the rest of them in this fashion.
echo "myValue" | ./script.sh
I do not have access to modify the script to just read the arguments.
Any ideas?