From owner-freebsd-stable Tue Dec 28 17: 6:18 1999 Delivered-To: freebsd-stable@freebsd.org Received: from pluto.psn.net (pluto.psn.net [207.211.58.12]) by hub.freebsd.org (Postfix) with ESMTP id 7B8A314E26 for ; Tue, 28 Dec 1999 17:06:16 -0800 (PST) (envelope-from will@shadow.blackdawn.com) Received: from 14-078.008.popsite.net ([209.69.195.78] helo=shadow.blackdawn.com) by pluto.psn.net with esmtp (PSN Internet Service 3.12 #1) id 1237Yy-0005Yz-00; Tue, 28 Dec 1999 18:06:05 -0700 Received: (from will@localhost) by shadow.blackdawn.com (8.9.3/8.9.3) id UAA37095; Tue, 28 Dec 1999 20:06:01 -0500 (EST) (envelope-from will) Message-ID: X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <99Dec29.104430est.40322@border.alcanet.com.au> Date: Tue, 28 Dec 1999 20:06:01 -0500 (EST) Reply-To: Will Andrews From: Will Andrews To: Peter Jeremy Subject: Re: /bin/test broken ? Cc: freebsd-stable@FreeBSD.ORG Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 28-Dec-99 Peter Jeremy wrote: > $ zsh -c '[ 1 -ne 0 ] && echo correct' > correct > $ zsh -c '/bin/[ 1 -ne 0 ] && echo correct' > zsh: bad pattern: /bin/[ > $ > > (Found by accident whilst looking into the original problem - I haven't, > but probably should, report it as a bug in zsh 3.0.5). I don't think so. It's a regex thing - you're supposed to escape the [ since it's parsed by the shell as a regex.. (just like parentheses, semicolons, stars, tildes, and so on). <2 5011-0> (99-12-28 20:02:04) [will@shadow ~]% /bin/\[ 1 -ne 0 && echo correct correct <2 5012-0> (99-12-28 20:02:11) [will@shadow ~]% [ 1 -ne 0 ] && echo correct correct FWIW: <2 5002-0> (99-12-28 20:03:38) [will@shadow ~]% pkg_info -Ia | grep zsh zsh-3.1.6 The Z shell (development version) <2 5003-0> (99-12-28 20:03:39) [will@shadow ~]% grep will /etc/passwd will:*:1000:1000:Will Andrews:/home/will:/usr/local/bin/zsh ..although I'm not sure why /bin/[ behaves like this: <2 5004-0> (99-12-28 20:03:47) [will@shadow ~]% /bin/\[ 1 -ne 0 ] && echo correct [: ]: unexpected operator *shrug* could be some weird kink. :-) -- Will Andrews GCS/E/S @d- s+:+>+:- a--->+++ C++ UB++++ P+ L- E--- W+++ !N !o ?K w--- ?O M+ V-- PS+ PE++ Y+ PGP+>+++ t++ 5 X++ R+ tv+ b++>++++ DI+++ D+ G++>+++ e->++++ h! r-->+++ y? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message