I’m not sure if the title explain the real problem.
I have a shell script load_config.shusing bash shell. This script will load the configuration. Before starting to load the configuration, it prompt the user "Do you want to load all configurations? Y/N ?". If the user choose “N” it does a different job with many questions prompting.
Now the real problem is; I have added this script to run in Makefile as below. My idea is to load all the configuration when I say make install, but then the script would prompt the user. I now donot want the script to prompt and it should take defaul ‘Y’ and install all configuration. How do I make this happen ?
.load_cfg.done : %
@echo -e "\n* Loading configuration $<"
$(PIN_HOME)/cfg/load_config.sh $<
touch $@
Shell : BASH
OS : LINUX
Use the
yescommand, in order to send a certain string into a user prompt.For example, say your script looks like this:
Pipe
yesinto your script: