Eric Blake dixit:
>powerful approach. Can we get buy-in from other shell developers to
>support '>;' as an atomic temp-file replacement-on-success idiom, if
Urgh, PLEASE NOT!
People complain about the readability of code enough already, and as
practice shows, things like [[ have been around and
Dan Douglas dixit:
>Zsh and pdkshes produce:
>
>one:::two:three:::four
>
>For all of the above, which I think is wrong for the last 4. ksh93 produces:
Why is it incorrect?
The mksh manpage documents $@ behaving like $*:
@ Same as $*, unless it is used inside double quotes, in which c
Chet Ramey dixit:
>> 2. IFS side-effects don't take effect during expansion.
>
>Yeah, this is a tough one. If you want side effects of assignments to IFS
>to affect subsequent expansions, you have to have a way to ensure that the
I think changing IFS during expansion is just asking for trouble.
Dan Douglas dixit:
>of any reason it should be inserting a '':'' between the two arguments,
>especially for the ''$@'' variants, either quoted or unquoted. It certainly
>can't be because of a word splitting step.
‘:’ is ${IFS::1} and inserted because of the word *concatenation*
(not splitting)
Dan Douglas dixit:
>Well, ok then. I'm just nitpicking here. I think this makes sense because it
>distinguishes between $@ and $* when assigning to a scalar, so that the end
>result of $@ is always space-separated, as spaces delimit words during command
[…]
>Consider for example if you ever imp
Dan Douglas dixit:
>For "$@" that sounds about right. I think it would be preferable if x="$@" and
>x=$@ were the same. If a user wants IFS-delimited they should probably use
Hrm, but the docs, both, specifically say that (unquoted) $@ behaves
like $* except in the face of no arguments, so I ca
Hi!
Thanks for these analysēs! Please steer stuff like this to
the mksh list in the future as well (and/or prod me on IRC).
TIA! (Sorry for the late reply, I just discovered this in my
postponed-msgs eMail folder and finished it to be sendable.)
On Wed, 7 Jan 2015, Eduardo A. Bustamante López wr