home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!mcsun!sun4nl!dutrun!donau!donau.et.tudelft.nl!bas
- From: bas@phys.uva.nl (Bas de Bakker)
- Subject: Re: If shell command switches.
- In-Reply-To: gsa@alcor.concordia.ca's message of 17 Aug 92 17: 19:24 GMT
- Message-ID: <BAS.92Aug18100206@carlo.phys.uva.nl>
- Sender: news@donau.et.tudelft.nl (UseNet News System)
- Nntp-Posting-Host: carlo.phys.uva.nl
- Organization: Institute for Theoretical Physics, Amsterdam, the Netherlands
- References: <1992Aug6.195643.4702@prl.dec.com> <Bss2xD.GKE@root.co.uk>
- <22412@sybase.sybase.com> <4755@daily-planet.concordia.ca>
- Date: Tue, 18 Aug 1992 15:02:06 GMT
- Lines: 20
-
- >>>>> On 17 Aug 92 17:19:24 GMT, gsa@alcor.concordia.ca ( CON U GRADUATE STUDENTS' ASSOC ) said:
-
- cugsa>does anyone know where I can find the complete switch listing
- cugsa>of the "if" statement? I can't seem to find it anywhere..ie:
- cugsa>man csh/tcsh/ksh.., yet I know of the if [-f] and if [-r]
- cugsa>only because I saw it used in other scripts. There are other
- cugsa>switches..but apparently sparse documentation as to what they
- cugsa>are and do.
-
- The if statement just looks whether its 'argument' is true or not. All
- these -f like switches between [ ] are really processed by the
- test(1) command. '[ expression ]' is equivalent to 'test expression'.
-
- So, to get a list of these switches, do 'man test'.
-
- (Some shells have a builtin test, but these take at least the switches
- of the system test and if there are more the shell manual should
- mention them.)
-
- Bas de Bakker.
-