diff --git a/docs/cookbook/c/hello world.list.od b/docs/cookbook/c/hello world.list.od index 6f5078e..2d6f8a7 100644 --- a/docs/cookbook/c/hello world.list.od +++ b/docs/cookbook/c/hello world.list.od @@ -23,6 +23,6 @@ redo-ifchange "$S/sources" done | uniq printf '%s\n' "$LIBGTK2" "$LIBQT4" -) >$3 +) >"$3" -redo-stamp <$3 +redo-stamp <"$3" diff --git a/t/shelltest.od b/t/shelltest.od index 0eee13e..a568b86 100644 --- a/t/shelltest.od +++ b/t/shelltest.od @@ -522,6 +522,18 @@ x2=$(cd shlink && basename "$(pwd -L)") [ "$x1" = "t" ] || fail 122 [ "$x2" = "shlink" ] || fail 123 +# Reported by Wayne Scott on FreeBSD 7.0 (ancient). Apparently the sh (or +# bash?) there prints "$3: ambiguous redirect" if you redirect to it without +# putting the $3 in quotes (ie >"$3"). I hadn't seen that before, even +# though it's not obvious to most sh users that the > argument is implicitly +# quoted. +set a b "shelltest.tmp log.tmp" +rm -f "$3" $3 +echo hello >$3 || fail 130 +[ -e "$3" ] || fail 131 +[ ! -e "shelltest.tmp" ] || fail 132 +rm -f "$3" $3 + [ -e shelltest.failed ] && exit 41 [ -e shelltest.warned ] && exit 42 exit 40