Let's say i have 2 scripts called "fill_cup.sh" and "empty_cup.sh" and i create a 3rd script "cup.sh". How can i run/execute the scripts "fill_cup.sh" and "empty_cup.sh" in the script "cup.sh". I tried with sh fill_cup.sh and ./fill_cup.sh but it doesn't work.
echo enter a number read rep if test $rep eq 1 then #execute the script "fill_cup.sh" ./fill_cup.sh #error: No such file or directory done if test $rep -eq 2 then #execute script "empty_cup.sh" ./empty_cup.sh #error: No such file or directory done
It gives me "No such file or directory" error
I gave the scripts all the permissions to read write and execute. I also made sure i'm present in the directory where the scripts are located and the run cup.sh but it still gives me the same error when it arrives to ./fill_cup.sh