On 08/23/2010 01:47 PM, Adam Kellas wrote:
Am I missing something, or do the -n and -v flags have no effect? The
following compares the behavior of bash, ksh, and dash (bash requires an
extra flag to suppress startup files):
% ksh -v -n -c uname
uname
% bash --norc -v -n uname
uname
% dash -v -n -c uname
Linux
POSIX states that an interactive shell may ignore 'set -n'; and by
extension, 'sh -n' can be a no-op if the shell would otherwise be
interactive. But your example is not an interactive shell; and POSIX is
clear that both -v and -n must have the same effect as an option to the
shell command line as they would have to a use of set within the shell.
I think the absence of handling for both of these options is a definite
bug according to POSIX rules on sh.
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html