-bash: findstr: command not found to solve the problem

Today there is a task that requires obtaining information apk version, saying that under the command on the line after the Baidu

adb shell dumpsys package com.baidu.searchbox | findstr versionCode

And then prompts -bash: findstr: command not found, probably means no findstr command

 

Then he went on Baidu, many of which are said path set not like, I have tried, are they not work

 

Tangled for a long time, and later found a system problem, I use a mac, mac is not in the findstr command, the findstr into grep to successfully get the version information of apk

Summary: In the win system, using: adb shell dumpsys Package Penalty for  com.baidu.searchbox | findstr versionCode order to find relevant information

           在mac(linux) 使用:adb shell dumpsys package com.baidu.searchbox | grep versionCode

 

 

 

  • Add to phrasebook
     
    • Without this set of words: English -> Chinese (simplified) ...
       
    • Create a new set of words ...
  • copy
 
 
 
 
 
 
grep
 
grep
 
 
Phonetic or Roman alphabet
Grep
SAVE
CONTINUE
view saved words →
Do not double-click translation
 
Do not show floating button
 
 
No network connection
 
  • Add to phrasebook
     
    • Without this set of words: English -> Chinese (simplified) ...
       
    • Create a new set of words ...
  • copy

Guess you like

Origin www.cnblogs.com/jueshilaozhongyi/p/11890142.html