proc = Runtime.getRuntime().exec(new String[]{"ls"});
Using code above we can launch ls, we can pass arguments. But how to launch something like this:
ls | egrep "init|sys"
About 'Duplicate': Unfortunately original question solution doesn't work for me. Exception:
Error running exec(). Command: [/bin/sh, -c, logcat | grep something] Working Directory: null Environment: null