Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Dec 1999 01:35:52 +0300
From:      Vlad Skvortsov <vss@ulstu.ru>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: /bin/test broken ?
Message-ID:  <19991226013551.A43483@ulstu.ru>
In-Reply-To: <99Dec24.105638est.40325@border.alcanet.com.au>
References:  <99Dec23.123516est.40332@border.alcanet.com.au> <199912232030.MAA65714@pau-amma.whistle.com> <99Dec24.105638est.40325@border.alcanet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <vlad@hq> /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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991226013551.A43483>