Hi all,
So I am trying build a quick bash script that will stop an application on 1 level of the case statement but inside it can bring down certain components of it separately but I am really fighting with it. The commands I want on the cmd line are the following:
Quote:
./script.sh start
./script.sh start comp
./script.sh stop
./script.sh stop comp
|
Code I have currently:
Code:
ACTION="$1"
OPTION="$2"
case ${ACTION} in
start)
echo "starting the application"
;;
case ${OPTION} in
comp) echo "Starting app component"
;;
esac
stop)
echo "stopping the application"
;;
esac
Please be gently as I did try and I am very much still learning how this all works.
Thanks for any help you can provide.