Quote:
Originally Posted by twobob
PHP Code:
# Now however you write a read command block:
read C
case $C in
'HOME' ) "$SETPROP com.lab126.appmgrd start app://com.lab126.booklet.home" ;;
'SCREEN SAVER' ) "$SETPROP com.lab126.appmgrd start app://com.lab126.booklet.settings?diagnosticMode=\;411" ;;
* ) : # no-op ;
esac
I have no idea why that doesn't work.
|
Well for one thing that ? is an unescaped shell metacharacter. It's probably not changing, due to matching nothing, but still, it's probably safer to say
PHP Code:
'SCREEN SAVER' ) "$SETPROP" 'com.lab126.appmgrd start app://com.lab126.booklet.settings?diagnosticMode=;411';;
i.e. change quotation style after the command, since you no longer need parameter expansion after that point. Only, even that isn't what you want, because that's passing *one* parameter to setprop, which happens to have spaces in it. setprop isn't going to like that. Try
PHP Code:
'SCREEN SAVER' ) "$SETPROP" com.lab126.appmgrd start 'app://com.lab126.booklet.settings?diagnosticMode=;411';;
Shell quoting... it has defeated all of us from time to time.