Configuration Information:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR
uname output: Linux zeus 4.8.0-1-amd64 #1 SMP Debian 4.8.5-1 (2016-10-28)
x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

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")



Repeat-By:

  Use $((~0)) (without spaces) to generate the error.

Reply via email to