home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!klaava!hurtta
- From: hurtta@cs.Helsinki.FI (Kari E. Hurtta)
- Newsgroups: comp.unix.shell
- Subject: Re: "if () then" file tests in sh/csh/tcsh
- Message-ID: <HURTTA.92Sep8120911@plootu.Helsinki.FI>
- Date: 8 Sep 92 10:09:11 GMT
- References: <1992Sep8.095348@masg6.epfl.ch>
- Sender: news@klaava.Helsinki.FI (Uutis Ankka)
- Organization: Department of Computer Science, University of Helsinki, Finland
- Lines: 42
- In-Reply-To: posse@masg6.epfl.ch's message of 8 Sep 92 07: 53:48 GMT
-
- In article <1992Sep8.095348@masg6.epfl.ch> posse@masg6.epfl.ch (Christian Posse) wrote:
- > Hi shells gurus !
- >
- > In the man of sh/csh/tcsh and the FAQ, I have not found a description of
- > the file tests in "if" expressions :
- >
- > What means "if ( -d file && -x file) then".
- > Which parameters are available and for what (-d, -x, -t, .. ?)
- > Which complexity is possible : how many ()/&&/... I guess && means "or"
- > but which symbol for "and" ....
- >
- > Is there a documentation available ?
-
- In sh format is:
- if program arguments...
- then
- commands...
- fi
-
- (You can replace new line with ;)
-
- There is program named [
- or that name thare isn't manual page, but
- it have also another name: test
- For that name manual page exists.
- (If that program is called with name [ it
- requires that last argument is ] otherwise
- isn't).
-
- For csh/tcsh format:
- if ( expression ) then
- endif
-
- There is in csh manual page tittle 'Expression
- and Operators'. Look that.
-
- - K E H
- ( Kari.Hurtta@Helsinki.FI,
- hurtta@cc.Helsinki.FI,
- hurtta@cs.Helsinki.FI,
- HURTTA@FINUH.BITNET
- )
-