[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error message garbage when parameter expansion used inside (()) and
From: |
Greg Wooledge |
Subject: |
Re: Error message garbage when parameter expansion used inside (()) and variable unset |
Date: |
Tue, 3 Apr 2018 13:25:38 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Tue, Apr 03, 2018 at 12:15:14PM -0500, PRussell wrote:
> ./t.sh: line 9: ���#V: var1 == : syntax error: operand expected (error
> token is "== ")
>
> archlinux has the same version of bash and I got the same results as on
> opensuse.
I cannot reproduce this on Debian 9 amd64. Not with Debian's build of
bash, nor with any of my self-compiled builds.
Nor with bash 4.3.28 on HP-UX 11.11.
> #!/bin/bash
>
> # system info
> lsb_release -d
> printf -- 'Bash Version: %s\n\n' "${BASH_VERSION}"
>
> # test example
> echo 3B
> ( set -x; var=0;var1=var; (( var1 == $var2 )) && echo yes || echo no )