Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: surprise with echo
You apparently missed my point that script was meant to be run by a Plan 9
rc shell. See the "#!/usr/bin/rc" at the top. It was meant to exhibit the
behavior of the shell the zsh RC_EXPAND_PARAM option is meant to emulate.
On Thu, Dec 18, 2014 at 8:39 PM, Lawrence Velázquez <larryv@xxxxxxxxxxxx>
wrote:
>
> On Dec 18, 2014, at 11:14 PM, Kurtis Rader <krader@xxxxxxxxxxxxx> wrote:
>
> > I created a shell script containing
> >
> > #!/usr/bin/rc
> >
> > echo echoing1: $@
> > echo echoing2: $*
> > echo echoing3: $* $@ killed
> > echo echoing4: $@ $* dead
> >
> > echo aaa^$*^bbb
> > echo ccc^$@^ddd
>
> This doesn't reproduce the environment Ray had because your positional
> parameters get substituted into their own words.
>
> % cat /private/tmp/x.zsh
> echo echoing1: $@
> echo echoing2: $*
> echo echoing3: $* $@ killed
> echo echoing4: $@ $* dead
> echo aaa^$*^bbb
> echo ccc^$@^ddd
> echo
> echo "echoing5: $@"
> echo "echoing6: $*"
> echo "echoing7: $* $@ killed"
> echo "echoing8: $@ $* dead"
> % zsh !$
> zsh /private/tmp/x.zsh
> echoing1:
> echoing2:
> echoing3: killed
> echoing4: dead
> aaa^^bbb
> ccc^^ddd
>
> echoing5:
> echoing6:
> echoing7: killed
> echoing8: dead
> % zsh -P !$
> zsh -P /private/tmp/x.zsh
> echoing1:
> echoing2:
> echoing3: killed
> echoing4: dead
>
>
>
>
> echoing6:
>
>
> %
>
> vq
--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
Messages sorted by:
Reverse Date,
Date,
Thread,
Author