grep command fails on one Windows PC, but works on other Windows PC w/ same configuration

8,382

Instead of using grep, may I suggest the native windows command find would work as well in this example?

adb logcat | FIND /I "apk" 
Share:
8,382

Related videos on Youtube

Ashish Chauhan
Author by

Ashish Chauhan

Updated on September 18, 2022

Comments

  • Ashish Chauhan
    Ashish Chauhan over 1 year

    I want to issue a logcat command to filter logs specifying a keyword (say apk). But I am facing an issue where the grep command is not recognized on one of my windows 7 PC. The same command works perfectly on other PC with same configuration.

    Command issued on windows command prompt :

    adb logcat | grep apk  
    

    Output :

    'grep' is not recognized as an internal or external command,operable program or batch file.
    

    Output of working setup :

    01-01 00:00:41.212  1598  2192 W PackageParser: No actions in intent filter at /system/priv-app/GoogleRestore/GoogleRestore.apk Binary XML file line #94
    01-01 00:00:41.228  1598  2193 W PackageParser: No actions in intent filter at /system/priv-app/Contacts/Contacts.apk Binary XML file line #443
    

    Need help in knowing the delta between two PCs. And how can I get the same command working on other PC as well.

    • RalfFriedl
      RalfFriedl over 5 years
      Either one of them has grep installed and the other doesn't, or one has grep in the default PATH and the other doesn't.
    • K7AAY
      K7AAY over 5 years
      Would you please be so kind as to run PATH on both machine HAPPY and machine SAD, and to post the results above by clicking on the edit link above and to the left? And, please also do C: && CD \ && dir /s grep.exe {Enter} on each PC and post the results by the same means.