there is a shell library that I am not in control of that does not accept user parameters. When I run script.sh, it asks me to input a parameter. I was wondering if there is a way to assign those parameters automatically in another file.
More details: I am guessing the shell library that I am not able to edit or view source code has something like this:
echo "Do that? [Y,n]"
read DO_THAT
if [ "$DO_THAT" = "y" ]; then
  do_that
fi
What I want is to run a file that will assign 'y' to the read parameter 'DO_THAT'.. but I do not know what the read parameter is called.
current command that I tried is:
./script.sh
echo "y"
or
./script.sh y
both did not work.
What happens if I run ./script.sh directly:
-bash-4.2$ ./script.sh
-bash-4.2$ Do that? [Y,n]:
I input y then click enter. What is the equivalent to user inputting a y then clicking enter in bash code in my scenario?
