From owner-freebsd-stable Sat Dec 25 14:36:19 1999 Delivered-To: freebsd-stable@freebsd.org Received: from mail.ulstu.ru (ns.ulstu.ru [62.76.34.36]) by hub.freebsd.org (Postfix) with ESMTP id E72F114BE1 for ; Sat, 25 Dec 1999 14:36:06 -0800 (PST) (envelope-from vss@mail.ulstu.ru) Received: (from vss@localhost) by mail.ulstu.ru (8.8.5-MVC-230198/8.8.7) id BAA43776 for freebsd-stable@FreeBSD.ORG; Sun, 26 Dec 1999 01:35:52 +0300 (MSK) (envelope-from vss) Date: Sun, 26 Dec 1999 01:35:52 +0300 From: Vlad Skvortsov To: freebsd-stable@FreeBSD.ORG Subject: Re: /bin/test broken ? Message-ID: <19991226013551.A43483@ulstu.ru> Mail-Followup-To: freebsd-stable@FreeBSD.ORG References: <99Dec23.123516est.40332@border.alcanet.com.au> <199912232030.MAA65714@pau-amma.whistle.com> <99Dec24.105638est.40325@border.alcanet.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <99Dec24.105638est.40325@border.alcanet.com.au> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Dec 24, 1999 at 11:05:35AM +1100, Peter Jeremy wrote: > >>That said, the error message should have been: > >> test: ]: unexpected operator > >>and it is not clear why you are getting `[' reported as the program > >>name. > > > >Well, /bin/test and /bin/[ are links to the same inode: > > Agreed, but the error message is printed by errx(3). errx(3) prints > __progname (which is effectively equivalent to argv[0]) as the program > name - ie the name by which the program was invoked. > > test(1) includes a check near the beginning to see it it was invoked as > `[' and if it was it checks to see that the last argument is `]' and > deletes it if it was. In both cases, the remaining arguments are then > passed to the expression evaluator. Why I did an original post is because it appeared that my cron job doesn't work any more: Date: Sun, 26 Dec 1999 01:30:01 +0300 (MSK) From: root@spc.high (Cron Daemon) To: vlad@spc.high Subject: Cron /bin/[ -f /var/run/INET ] && /usr/local/bin/fetchmail From root@spc.high Sun Dec 26 01:30:03 1999 [: ]: unexpected operator It _did_ work before. I put your attention that you'd try using /bin/[, not just [ (as someone on this list did). The latter is executed by shell, obviously. Judjed by my logs the last change to /bin/test was on Dec, 16 or somewhere about. -- Vlad Skvortsov, vss@ulstu.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message