From owner-freebsd-questions Sun Jun 20 18:23:34 1999 Delivered-To: freebsd-questions@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 9DA4E15170 for ; Sun, 20 Jun 1999 18:23:29 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id KAA06861; Mon, 21 Jun 1999 10:53:31 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id KAA45802; Mon, 21 Jun 1999 10:53:37 +0930 (CST) Date: Mon, 21 Jun 1999 10:53:37 +0930 From: Greg Lehey To: Michael Wang Cc: freebsd-questions@FreeBSD.ORG Subject: Re: what is the command named "[" in /bin directory? Message-ID: <19990621105336.B6820@freebie.lemis.com> References: <199906210117.VAA04758@cicgload-fs1-p.tech.cicg.ml.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <199906210117.VAA04758@cicgload-fs1-p.tech.cicg.ml.com>; from Michael Wang on Sun, Jun 20, 1999 at 09:17:50PM -0400 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sunday, 20 June 1999 at 21:17:50 -0400, Michael Wang wrote: > Dear FreeBSDers: > > What is the command named "[" in /bin as shown below? It's a synonym for 'test': $ls -li /bin/[ /bin/test 1435 -r-xr-xr-x 2 root wheel 48732 Jun 18 11:29 /bin/[ 1435 -r-xr-xr-x 2 root wheel 48732 Jun 18 11:29 /bin/test It's used for things like: if [ -f /unix ]; then echo "System V"; elif [ -f /kernel ]; then echo BSD; fi Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message