From 445832714254de79eb2339de4792050ed866796b Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 27 Aug 2013 14:15:50 -0700 Subject: [PATCH] fix uses of grep in envsetup.h make sure we don't use a grep alias if one exists. Change-Id: Id8e394f5889d9a5f1d320ecb289c974da8f14207 --- envsetup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/envsetup.sh b/envsetup.sh index f86081d05..0661fe66f 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -803,7 +803,7 @@ function qpid() { local EXE="$1" if [ "$EXE" ] ; then - qpid | grep "$prepend$EXE$append" + qpid | \grep "$prepend$EXE$append" else adb shell ps \ | tr -d '\r' \ @@ -824,7 +824,7 @@ function pid() if [ "$EXE" ] ; then local PID=`adb shell ps \ | tr -d '\r' \ - | grep "$prepend$EXE$append" \ + | \grep "$prepend$EXE$append" \ | sed -e 's/^[^ ]* *\([0-9]*\).*$/\1/'` echo "$PID" else @@ -930,7 +930,7 @@ function gdbclient() if [[ ! "$PID" =~ ^[0-9]+$ ]] ; then # that likely didn't work because of returning multiple processes # try again, filtering by root processes (don't contain colon) - PID=`adb shell ps | grep $3 | grep -v ":" | awk '{print $2}'` + PID=`adb shell ps | \grep $3 | \grep -v ":" | awk '{print $2}'` if [[ ! "$PID" =~ ^[0-9]+$ ]] then echo "Couldn't resolve '$3' to single PID"