[6722] in Athena Bugs

home help back first fref pref prev next nref lref last post

rt 7.1H: sh, test man pages

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Fri Dec 28 09:27:44 1990

From: sethf@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Fri, 28 Dec 90 09:27:32 EST

System name:		frumious-bandersnatch
Type and version:	RTPC-ROMPC 7.1H
Display type:		apa16

What were you trying to do?
	Understand the construction
		if [ -f filename ]; then
	found in many sh scripts

What's wrong:
	Neither the sh nor the test man pages mention that test can be
called as '[', and when called as '[' test requires an argument of ']'.
	The above looks like a shell built-in construction. It's
extremely confusing if you don't already know what it is.

What should have happened:
	Maybe '[' should have a man page linked to test(1).
	It would be nice if sh(1) mentioned the above construction.
	test(1) should definitely mention that it can be called as '[',
requiring ']'.

Please describe any relevant documentation references:
	sh(1), test(1)

home help back first fref pref prev next nref lref last post