[3351] in RedHat Linux List
Re: what is /usr/bin/[ ?
daemon@ATHENA.MIT.EDU (Ian Burrell)
Fri Nov 8 04:36:10 1996
To: redhat-list@redhat.com
Date: Fri, 8 Nov 1996 01:33:03 -0800 (PST)
In-Reply-To: <Pine.SOL.3.91.961108041724.10150A-100000@sun2.bnl.gov> from "jyan-min fang" at Nov 8, 96 04:20:40 am
From: Ian Burrell <iburrell@leland.Stanford.EDU>
Reply-To: iburrell@leland.Stanford.EDU
Resent-From: redhat-list@redhat.com
>
> the title says it all. so what is /usr/bin/[?
> (I can't find the man page for it)
>
It is a synonym for the test program (you want 'man test'). The
reason that it is called [ is so you can use it in Bourne shell if
statements to make them look more like a programming language:
if [ -e /etc/hosts]; then; fi
This is a equivalent to:
if test -e /etc/hosts; then ; fi
Bash (the default shell) has this command built-in so read its manual
page as well.
- Ian
--
-- Ian Burrell == iburrell@leland.stanford.edu **
<URL:http://www-leland.stanford.edu/~iburrell/>
No matter how much you know, you will never know enough.
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
________________________________________________________________________
http://www.redhat.com/RedHat-FAQ http://www.redhat.com/RedHat-Errata
http://www.redhat.com/RedHat-Tips http://www.redhat.com/mailing-lists
------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null