Unexpected operator error [duplicate]
问题 This question already has an answer here : Bash scripting unexpected operator (1 answer) Closed 3 years ago . What is wrong in my code? #!/bin/sh LOOK_FOR="$1" for i in `find $2 -name "*jar"`; do echo "Looking in $i ..." #jar tvf $i | grep $LOOK_FOR > /dev/null jar tvf "$i" | grep "$LOOK_FOR" if [ $? == 0 ] ; then echo "==> Found \"$LOOK_FOR\" in $i" fi done #line 13 Output wk@wk-laptop:$ sh lookjar.sh org/apache/axis/message/addressing/EndpointReference /media/0C06E20B06E1F61C/uengine