aboutsummaryrefslogtreecommitdiffstats
path: root/examples/scripts.noah
diff options
context:
space:
mode:
Diffstat (limited to 'examples/scripts.noah')
-rw-r--r--examples/scripts.noah/number.bash2
-rw-r--r--examples/scripts.noah/string.bash4
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/scripts.noah/number.bash b/examples/scripts.noah/number.bash
index 23e58b4..37b62b6 100644
--- a/examples/scripts.noah/number.bash
+++ b/examples/scripts.noah/number.bash
@@ -108,7 +108,7 @@ function number ()
;;
0 ) : ;;
* )
- if test ".${val2}" != '.' -a ".${d1}" != '.0' ; then
+ if test ".${val2}" != '.' && test ".${d1}" != '.0' ; then
val2="${val2}-"
fi
case "${d1}" in
diff --git a/examples/scripts.noah/string.bash b/examples/scripts.noah/string.bash
index 38c0af8..d80ebe8 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