On 11/27/16 12:33 PM, Bize Ma wrote:

> Bash Version: 4.4 
> Patch Level: 5 
> Release Status: release 
> 
> Description: 
>   The ~ operator is called not, and does a one's complement of the
> following value. That works correctly with  
> 
>    $ echo $(( ~1 )) 
>    -2 
> 
> Even with 
> 
>    $ echo $(( ~0 )) 
>    -1 
> 
> But fails with this: 
> 
>    $ echo $((~0)) 
>    bash: /home/user: syntax error: operand expected (error token is
> "/home/user") 

Yes, this is a problem.  Thanks for the report.  I'll fix it in the
next devel branch push.  For the time being, you can include the
leading space to suppress the unwanted tilde expansion.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to