I have a script called operation.sh and while i am running the script, will be getting output like below and will wait for user input.
1. Start 2. Restart 3. Stop 4. Status Enter Option:
Once I pressed "1", it will perform some logic and again it will come to above view.
I need to call the operation.sh from other sh (i.e., other.sh) like,
It has to perform the same logic as when I pressed 1 in operation.sh.
other.sh is having below content.
sh operation.sh 1
I could understand, it doesn't make sense (but I tried since I don't have any idea).
How can I call a menu script(which is performing action based on user selected menu) from another script.