"grep" command is missing on MC40?

does anyone know if the "grep" command is available on the MC40? 

when i try to run it using "ADB shell", i get he following error message " 'grep' is not recognized as an internal or external command,"

 

am i just missing the path to it or is it not on this device?

 

 

thanks,

afshin

Afshin Mansoorieh
getting a little closer, i

getting a little closer, i was running the grep command directly from the PC [adb shell ls -l | grep text]  and the error message was coming from DOS shell.

now just doing a shell into the MC40 [adb shell] and get the $ prompt.  now I type [ls -l | grep text] and get the error: "grep, permission denied" 

looks like i need to be root to run the grep command which seems strange since it is a user level shell command. 

does anyone know if there is a way to run GREP on MC40? 

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


DecisionPoint K...
Most Android devices use a

Most Android devices use a Busybox replacement called Toolbox for all of the normal command line tools. I presume the MC40 also uses Toolbox. Try grep --version and see what it says. It might be that grep does not have correct permissions (it needs execute permissions). On my Samsung phone, here is what the permissions look like:

1|shell@android:/ $ ls -l -a /system/bin/grep                                 

lrwxrwxrwx root     root              2013-03-10 17:43 grep -> toolbox

Edit: Also consider taking a look at this "Android under the hood" article.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments