View Single Post
Old 03-25-2013, 09:16 AM   #11
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by twobob View Post
PHP Code:
SETPROP=/usr/bin/lipc-set-prop

# Whitespace == :Space:Tab:Line Feed:Carriage Return:
readonly WSP_IFS=`printf "\x20\x09\x0A\x0D"`
# No Whitespace == :Line Feed:Carriage Return:
readonly NO_WSP=`printf "\x0A\x0D"`
# Whitespace == :Space:Tab:
readonly WSP=`printf "\x20\x09"`

IFS=${NO_WSP}

# Now however you write a read command block:
read C
case $C in
  
'HOME' IFS=${WSP_IFS} ; "$SETPROP com.lab126.appmgrd start app://com.lab126.booklet.home" ;;
  
'SCREEN SAVER' IFS=${WSP_IFS} ; "$SETPROP com.lab126.appmgrd start app://com.lab126.booklet.settings?diagnosticMode=\;411" ;;
  * ) : 
# no-op ;
esac 
I have no idea why that doesn't work.

I'll sleep on it.

Happily will take advice...

It DOES match the case... then nothing happens?

Sigh
Re-enable whitespace word splitting after the case match.
See mark-up above (quote has been changed).

Last edited by knc1; 03-25-2013 at 09:19 AM.
knc1 is offline   Reply With Quote