Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!seismo!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.shell Subject: Re: Question about 'test' (Was Re: testing if a file is present) Message-ID: <4586@auspex.auspex.com> Date: 29 Nov 90 19:04:36 GMT References: <1990Nov21.191638.19469@athena.mit.edu> <90326.175421PPH93@DMSWWU1A.BITNET> Organization: Auspex Systems, Santa Clara Lines: 11 >But what will the (bourne-) shell say about... >> >> if [ -r filename ]; then It'll say "OK, this 'if' is going to run the command named '[', passing it '-r' as its first argument, 'filename' as its second argument, and ']' as its third argument." "test"/"[" will then say "well, I was invoked as '[' rather than 'test'; that means I should check to make sure my last argument is ']', and complain otherwise."