0

I am very easily printing my logcat to file by doing this:

Process process = Runtime.getRuntime().exec( "logcat -f test.txt");

But I would like to filter the content based on matching words, I thought about using grep and the operator >to print to file but that didn't work. No file is being created.

Process process = Runtime.getRuntime().exec("logcat -d | grep -n \"System.out\" > test.txt");
butexa
  • 165
  • 8

0 Answers0