From: John L. <mov...@us...> - 2003-06-16 23:05:08
|
Update of /cvsroot/oprofile/oprofile/utils In directory sc8-pr-cvs1:/tmp/cvs-serv21922/utils Modified Files: opcontrol Log Message: Fix -e. echo has to be the worst designed utility in the world, which is surprisingly given what a simple job it's supposed to do. Index: opcontrol =================================================================== RCS file: /cvsroot/oprofile/oprofile/utils/opcontrol,v retrieving revision 1.59 retrieving revision 1.60 diff -u -p -d -r1.59 -r1.60 --- opcontrol 16 Jun 2003 22:57:27 -0000 1.59 +++ opcontrol 16 Jun 2003 23:05:05 -0000 1.60 @@ -453,12 +453,12 @@ do_options() { while [ "$#" -ne 0 ] do - arg=`echo $1 | awk -F= '{print $1}'` - val=`echo $1 | awk -F= '{print $2}'` + arg=`printf %s $1 | awk -F= '{print $1}'` + val=`printf %s $1 | awk -F= '{print $2}'` shift if test -z "$val"; then local possibleval=$1 - echo "$possibleval" | grep ^- >/dev/null 2>&1 + printf %s $1 "$possibleval" | grep ^- >/dev/null 2>&1 if test "$?" != "0"; then val=$possibleval shift |