/bin/sh -s flag

Chris Torek chris at mimsy.UUCP
Tue Oct 4 08:04:19 AEST 1988


>In article <13820 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>>The `-s' option means `reading stdin'; it gets set automatically
>>*after* the shell sets up $-.  When you `set <anything>', sh updates
>>its list of currently set flags, and -s suddenly appears.  I regard
>>this as a minor bug, which I may fix later.

In article <8625 at smoke.ARPA>, gwyn at smoke.ARPA (Doug Gwyn ) writes:
>Be careful!  The c, s, i, and r flags are automatically set by the shell
>and should not be alterable by the user.  The s flag SHOULD be set for
>normal interactive shell use.

You misinterpret: I mean that `$-' should expand to s *before* typing
`set'.  I.e.:

	% /bin/sh
	$ echo $-
	s
	$ 

The `r' flag has always been settable with `set -r'; obviously it
should not be unsettable with `set +r'.  `-s' is in fact never
inspected again, and clearing it after startup would have no effect,
but I have arranged that both it and -i cannot be unset.  The -c flag
is parsed specially anyway, so it is no trouble.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list