I have a bash script for uninstalling some software that is loaded onto our devices.
#!/bin/bash APKS=`adb shell pm list packages projects` for apk in $APKS do apk=${apk##package:} echo "Uninstalling: $apk" adb uninstall $apk done
When i run this script, all of the commands to uninstall an apk fail. However, when i run the exact same command (adb uninstall projects.abd.def
) outside of the bash script, it executes successfully.
What am i doing wrong in the bash script?