When trace lines are passed through echo tabs are being changed
to spaces, causing later string comparisons to fail. Add quotes
around the variables to prevent this.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
x=$2
cat $file | while read line; do
- comment=`echo $line | sed -e 's/^#//'`
+ comment=`echo "$line" | sed -e 's/^#//'`
if [ "$line" != "$comment" ]; then
continue
fi
echo "testing $line for >$x<"
- match=`echo $line | sed -e "s/>$x<//"`
+ match=`echo "$line" | sed -e "s/>$x<//"`
if [ "$line" = "$match" ]; then
fail "$line does not have >$x< in it"
fi