Hi Chet! On 11/26/22 18:44, Chet Ramey wrote:
On 11/25/22 4:02 PM, Alejandro Colomar wrote:Hi!I wrote a script, and am trying it on many systems. On RHEL8, which has bash 4, it didn't work. I could reduce the problem to the following command, which never returns true:test -v 1;This is a bash feature. I cribbed it from ksh93, and it first appeared in bash-4.2. The initial implementation was restricted to shell variables -- positional parameters like $1 are not shell variables. After a bunch of requests, like https://lists.gnu.org/archive/html/bug-bash/2018-12/msg00098.html https://lists.gnu.org/archive/html/bug-bash/2018-12/msg00104.html https://lists.gnu.org/archive/html/bug-bash/2020-01/msg00027.html I added support for testing positional parameters in bash-5.1.
That was my gut; thanks! I'll workaround with $#. Cheers, Alex -- <http://www.alejandro-colomar.es/>
OpenPGP_signature
Description: OpenPGP digital signature