I’ve hit a road block while building this shell program which includes some javascript jar files. I’ve already got the menu set up and a pause to get the user entry, i.e.
echo "Enter a number between 0-9"
read answer
case $answer in
0) { echo Starting...; java -jar SYSTEM.EAD/apktool.jar ; } ;;
1) { echo Starting...; java -jar SYSTEM.EAD/apktool.jar ; java -jar SYSTEM.EAD/signapk.jar SYSTEM.EAD/testkey.x509.pem SYSTEM.EAD/testkey.pk8 [file] ; } ;;
esac
Obviously it goes though 9 but its the example I want. In 1), right after “testkey.pk8”, there is the space to input a file. I want to make a functional pause in the script after the user inputs “1” from the initial echo so the user can enter the path to the file and then after pressing enter the script continues. I’ve seen it been done, I hope you guys have some suggestions. Thanks!
Use
read -p "Enter file path: " fpathin your ‘1’ case and use"$fpath"in place of<file>