diff options
Diffstat (limited to 'examples/functions/substr2')
-rw-r--r-- | examples/functions/substr2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/functions/substr2 b/examples/functions/substr2 index f5e75473..2bb8d363 100644 --- a/examples/functions/substr2 +++ b/examples/functions/substr2 @@ -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 |