diff options
author | jilles <jilles@FreeBSD.org> | 2012-02-11 21:06:45 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2012-02-11 21:06:45 +0000 |
commit | 0458d57ea3cd173f7a4e71d67ee628f844dbdd70 (patch) | |
tree | 852790d9d43354df7d798f44b33557a07ff9b181 /tools/regression/bin/sh | |
parent | 959ca16023aae7c8432edca09966fbccd16d5a90 (diff) | |
download | FreeBSD-src-0458d57ea3cd173f7a4e71d67ee628f844dbdd70.zip FreeBSD-src-0458d57ea3cd173f7a4e71d67ee628f844dbdd70.tar.gz |
sh: Make 'hash' return 1 if at least one utility is not found.
Reported by: lme
Diffstat (limited to 'tools/regression/bin/sh')
-rw-r--r-- | tools/regression/bin/sh/builtins/hash4.0 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/builtins/hash4.0 b/tools/regression/bin/sh/builtins/hash4.0 new file mode 100644 index 0000000..dec584c --- /dev/null +++ b/tools/regression/bin/sh/builtins/hash4.0 @@ -0,0 +1,6 @@ +# $FreeBSD$ + +exec 3>&1 +m=`hash nosuchtool 2>&1 >&3` +r=$? +[ "$r" != 0 ] && [ -n "$m" ] |