bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #111102] ksh93 oddity w.r.t. ${1+"$@"} on AIX (for section "Portable


From: anonymous
Subject: [sr #111102] ksh93 oddity w.r.t. ${1+"$@"} on AIX (for section "Portable Shell"?)
Date: Sat, 3 Aug 2024 06:26:43 -0400 (EDT)

Follow-up Comment #2, sr #111102 (group autoconf):

Thanks, I wouldn't have thought that this is worth such a long patch.

Two minor nits:

+verbose+
You may see usages like @samp{$@{1+"$@@"@}} in older shell scripts
designed to work around a portability problem in ancient shells.
Unfortunately this runs afoul of bugs in more-recent shells, and
nowadays it is better to use plain @samp{"$@@"} insteadl.
                                          typo: ^^^^^^^^
-verbose-

+verbose+
For many years shell scripts worked around this portability problem by
using @samp{$@{1+"$@@"@}} instead of @samp{"$@@"}, and you may see this
usage in older scripts.  Unfortunately, @samp{$@{1+"$@@"@}} does not
work with @command{ksh93} M 93t+ (2009) as shipped in AIX 7.2 (2015),
as this shell drops trailing arguments:
    probably insert "empty" ^ here?
-verbose-

BTW, what I haven't tested yet (and no AIX around right now):

* whether *non-trailing* empty arguments are dropped as well

* whether the ${foo+"$bar"} mechanism is flawed in general on that shell
(after all, the symptoms smell of double evaluation)

Could try that on Monday.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?111102>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]