On Monday, April 9, 2012 8:20:40 AM UTC-4, Vikas KM wrote:
>
> I want to execute a shell script in android
>
> *************** SHELL SCRIPT ********************
>
>  if [ ! -d "/sys/devices/platform/ehci-omap.0/usb1/1-2/1-2.4" ]; then
>     if [ -d "/sys/devices/platform/ehci-omap.0/usb1/1-2" ]; then
>         NUMINTERFACE=`cat 
> /sys/devices/platform/ehci-omap.0/usb1/1-2/bNumInterfaces`
>     fi
>  fi
>
> ********************************************************
>
> That is based on the path if it exists, I want to run another script...
>
> But i m unable to run the below script any idea what might be wrong?
>

Various things... but it's likely not relevant.

Take a step back and tell us what you are trying to accomplish.  It appears 
you are trying to create a shell variable or modify an environment variable 
based on the existence of a file.  Unless you are doing system programming 
(in which case you should be asking on android-porting) that's note really 
an android way of doing things and would be pointless anyway as the 
variable would not propagate anywhere.  On android, whatever app needs to 
know this information should be finding it out via an android-style ipc or 
property mechanism, or simply doing the checking itself.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to