Better, but:
- You don't need "fi" to end functions. It's for if statements.
- The exit function will not quit the script. Include the "exit" command or equivalent.
- This one:
This will execute whether wifi is enabled or not. Place the warning on the main menu instead of the function where the command is executed 
Also, do you have linux installed even on just a VM? You can try out the script with dummy outputs (just to test the script logic) in the terminal. Just replace the bash path with the proper one. (I use /system/bin/sh for phone testing and /bin/bash for PC)
- You don't need "fi" to end functions. It's for if statements.
- The exit function will not quit the script. Include the "exit" command or equivalent.
- This one:
Code:
tx(){
echo You need to run this only if you have Wi-Fi on!
iwconfig wlan0
fi
}
Also, do you have linux installed even on just a VM? You can try out the script with dummy outputs (just to test the script logic) in the terminal. Just replace the bash path with the proper one. (I use /system/bin/sh for phone testing and /bin/bash for PC)