From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5991 invoked from network); 13 Aug 2003 22:48:13 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Aug 2003 22:48:13 -0000 Received: (qmail 26151 invoked by alias); 13 Aug 2003 22:47:56 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6466 Received: (qmail 26141 invoked from network); 13 Aug 2003 22:47:55 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 13 Aug 2003 22:47:55 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [80.91.224.249] by sunsite.dk (MessageWall 1.0.8) with SMTP; 13 Aug 2003 22:47:55 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19n4QX-00063s-00 for ; Thu, 14 Aug 2003 00:49:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19n4QW-00063k-00 for ; Thu, 14 Aug 2003 00:49:08 +0200 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 19n4PK-0007up-00 for ; Thu, 14 Aug 2003 00:47:54 +0200 From: bkhl@elektrubadur.se (=?iso-8859-1?q?Bj=F6rn_Lindstr=F6m?=) Subject: Re: [[ ... ]], [ ... ], bash, zsh Date: Thu, 14 Aug 2003 00:44:00 +0200 Organization: Upsalafandom Message-ID: <87ptj9ch5b.fsf@lucien.dreaming> References: <20030813221633.GA1343@s.chello.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-PGP-Key: http://bkhl.elektrubadur.se/pubkey.asc X-Home-Page: http://bkhl.elektrubadur.se/ User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:vb1blW1Lj1+PVg52bps2qNC8L3U= Sender: news Haakon Riiser writes: > In both bash and zsh, the "-n" operator in [ ... ] is optional, but in > [[ ... ]] it's only optional in bash. Is there a reason for this? If you use [ ], the test is supposed to work like with test(1). In the case of zsh this is still handled by a built-in, I don't know how it is with bash. The [[ syntax is a shell-specific extension, and there are several differences between the shells on how the are interpreted.