Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ご存知のように、コマンドを使用して Android でログをフィルタリングできます。
adb shell logcat | grep "tag1"
すると、tag1 を含むログが出力されます。
ここで、tag1 と tag2 を含むログを出力できる 1 つのコマンドを使用したいと考えています。
使ってみますが、うまくいきません。
adb shell logcat | grep "tag1 tag2"
どうやってするの?
これは、grep を適切に使用する方法です。
adb shell logcat | grep -E "tag1|tag2"
または、logcat の組み込みフィルターを使用することもできます。
adb logcat -s tag1:* tag2:*