| Janis Papanagnou 2005-03-05, 8:47 pm |
| Michael A wrote:
> Hi,
>
> what's the difference between set - 1 2 3 and set -- 1 2 3
> I can't find any refs under man ksh .
>
> the result seems to be the same $1 $2 $3 are set to 1 2 3
>
> thanks
> Michael
>
Quoting set --man
"If no args are specified, not even the end of options argument --, the
positional parameters are unchanged. Otherwise, unless the -A options has
been specified, the positional parameters are replaced by the list of args. A
first arg of -- is ignored when setting positional parameters.
For backward compatibility, a set command without any options specified whose
first arg is - will turn off the -v and -x options. If any additional args
are specified, they will replace the positional parameters."
Janis
|