I am trying to execute the following command;
String cmd = "/system/bin/netstat -"+firstString+" | grep http";
Process process = Runtime.getRuntime().exec(cmd);
Log.d("1:CMD VALUE", cmd);
The log result is 1:CMD VALUE: /system/bin/netstat -a | grep http
However, the output is not getting filtered for the 'http' parameter. The regular "/system/bin/netstat -a" result is what I get for the "/system/bin/netstat -a | grep http`" command as well. Why is this? Is this because of the pipe symbol or the grep command? Please help. Thanks.