help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Arithmetic evaluation / expansion question


From: Andy Chu
Subject: Re: [Help-bash] Arithmetic evaluation / expansion question
Date: Wed, 10 Oct 2018 17:04:48 -0700

> I noted in the man page that null or unset variables evaluate to zero.
> Above, pd is a defined variable which holds "abc" (a string not beginning
> with zero - non-octal)
> pd is "arithmetically" evaluated to zero.  Is this as intended?  I.E. can
> this behavior be relied upon?
>

In an arithmetic context, pd is evaluated identically to $pd, so yes.  Just
think of it as the $ being optional.

Andy


reply via email to

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