[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: man page "-c" explanation clarity
From: |
Paul Jarc |
Subject: |
Re: man page "-c" explanation clarity |
Date: |
Tue, 23 Jan 2007 16:36:09 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) |
"Paul A. Clarke" <pc@us.ibm.com> wrote:
> The man page states, for the "-c" option:
> -c string If the -c option is present, then commands are read from
> string. If there are arguments after the string, they are
> assigned to the positional parameters, starting with $0.
> I think the phrase "arguments after the string" is confusing in that the
> "arguments" here are really still within "the string", not after.
bash -c 'printf %s\\n "$0" "$@"' arg0 arg1 arg2 arg3
"The string" refers to the part which, in this example, is
single-quoted, and the arguments are indeed after that, not within it.
> I'd suggest slightly different wording, such as:
> "... If argments follow the respective commands within the string, they
> are..."
That would suggest to me that arguments in the place of %s\\n in my
example are assigned to the positional parameters, which is not true.
paul