On 4/3/18 7:07 PM, PRussell wrote:
> Hi,
>
> The error seems to be localized to the expansion of PS4 when "set -x" is
> active.
>
> Please see sample script below.
It's not quite that, though the expansion below does demonstrate what I
think is the problem.
If I am right about the cause, the p
On 4/3/18 7:07 PM, PRussell wrote:
> Hi,
>
> The error seems to be localized to the expansion of PS4 when "set -x" is
> active.
>
> Please see sample script below.
>
> I am aware of the unusual parameter expansion for FUNCNAME. There might be a
> local historical reason. :-)
>
> It does not
Hi,
The error seems to be localized to the expansion of PS4 when "set -x" is active.
Please see sample script below.
I am aware of the unusual parameter expansion for FUNCNAME. There might be a
local historical reason. :-)
It does not happen outside of the PS4 expansion. It also behaves diffe
On 4/3/18 1:15 PM, PRussell wrote:
> Chet, is the output on opensuse running bash 4.4.19, correct?
>
> The specific output:
>
> ./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
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 Debi
Chet, is the output on opensuse running bash 4.4.19, correct?
The specific output:
./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.
Below are the details of running ./
On 4/2/18 5:16 PM, PRussell wrote:
> Section 6.5 Shell Arithmetic says,
>
> "Within an expression, shell variables may also be referenced by name without
> using the parameter expansion syntax. A shell variable that is null or unset
> evaluates to 0 when referenced by name without using the parame
On Mon, Apr 2, 2018 at 5:16 PM, PRussell
wrote:
>
> echo 4B
> ( set -x;var=5;var1=var; (( var1 == $var2 )) && echo yes || echo no )
>
>
> It appears that 3A and 4A evaluate to 0 because of the arithmetic context.
> 3A echo's yes; 4A echo's no.
>
> The problem is what is happening with 3B and 4B
On Mon, Apr 02, 2018 at 04:16:54PM -0500, PRussell wrote:
> The above tells us what happens to an unset variable if not using parameter
> expansion.
>
> But if a shell variable uses parameter expansion and is null or unset, what
> does it evaluate to inside (()) syntax?
The parameter expansion
Section 6.5 Shell Arithmetic says,
"Within an expression, shell variables may also be referenced by name without
using the parameter expansion syntax. A shell variable that is null or unset
evaluates to 0 when referenced by name without using the parameter expansion
syntax." - http://www.gnu.org/s
10 matches
Mail list logo