From owner-freebsd-hackers Fri Jul 5 01:06:34 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA28507 for hackers-outgoing; Fri, 5 Jul 1996 01:06:34 -0700 (PDT) Received: from mail0.iij.ad.jp (root@mail0.iij.ad.jp [192.244.176.61]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id BAA28502 for ; Fri, 5 Jul 1996 01:06:30 -0700 (PDT) Received: from uucp1.iij.ad.jp (uucp1.iij.ad.jp [192.244.176.73]) by mail0.iij.ad.jp (8.6.12+2.4W/3.3W9-MAIL) with ESMTP id RAA08875 for ; Fri, 5 Jul 1996 17:06:27 +0900 Received: (from uucp@localhost) by uucp1.iij.ad.jp (8.6.12+2.4W/3.3W9-UUCP) with UUCP id RAA04162 for freebsd-hackers@FreeBSD.ORG; Fri, 5 Jul 1996 17:06:27 +0900 Received: from xxx.fct.kgc.co.jp by yyy.kgc.co.jp (8.7.5/3.4W:95122611) id OAA05731; Fri, 5 Jul 1996 14:47:14 +0900 (JST) Received: from localhost by xxx.fct.kgc.co.jp (8.6.12/3.3W8:95062916) id OAA15001; Fri, 5 Jul 1996 14:47:13 +0900 Message-Id: <199607050547.OAA15001@xxx.fct.kgc.co.jp> To: freebsd-hackers@FreeBSD.ORG Subject: test(1) -h behavior (bug??) X-Mailer: Mew version 1.06 on Emacs 19.28.2, Mule 2.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Date: Fri, 05 Jul 1996 14:47:13 +0900 From: Toshihiro Kanda Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk If a symbolic link file ``foo'' points non-existence file, should ``/bin/test foo'' return 0 or 1? In FreeBSD 2.1R, /bin/test returns 1. While built-in command `test' of `GNU bash, version 1.14.2(1)' returns 0. bash$ ln -s nofile foo bash$ /bin/test -h foo ; echo $? 1 bash$ test -h foo ; echo $? 0 I've tested `SunOS 4.1.3_U1 sun4c', `NetBSD 1.1 sparc' and `IRIX64 6.2 IP19'. Then all these /bin/test returned 0. candy@fct.kgc.co.jp (Toshihiro Kanda)