Imported from ../bash-3.0.tar.gz.
[platform/upstream/bash.git] / examples / functions / substr2
index f5e7547..2bb8d36 100644 (file)
@@ -32,7 +32,7 @@ substr()
                shift $[ $OPTIND -1 ]
        fi
 
-       if [ "$#" -eq 0 -o "$#" -gt 2 ] ; then
+       if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then
                echo "substr: bad argument count"
                return 2
        fi