diff options
Diffstat (limited to 'examples/scripts.noah/string.bash')
-rw-r--r-- | examples/scripts.noah/string.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/scripts.noah/string.bash b/examples/scripts.noah/string.bash index 38c0af8b..d80ebe80 100644 --- a/examples/scripts.noah/string.bash +++ b/examples/scripts.noah/string.bash @@ -95,11 +95,11 @@ function strcmp () ###;;;autoload function strncmp () { - if [ -z "${3}" -o "${3}" -le "0" ]; then + if [ -z "${3}" ] || [ "${3}" -le "0" ]; then return 0 fi - if [ ${3} -ge ${#1} -a ${3} -ge ${#2} ]; then + if [ ${3} -ge ${#1} ] && [ ${3} -ge ${#2} ]; then strcmp "$1" "$2" return $? else |