bug-bash
[Top][All Lists]
Advanced

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

quote removal not performed in arithmetic expansion


From: Christopher Yeoh
Subject: quote removal not performed in arithmetic expansion
Date: Fri, 6 Jun 2003 17:13:48 +1000

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H  -I.  
-I/build/packages/bash/bash-2.05b -I/build/packages/bash/bash-2.05b/include 
-I/build/packages/bash/bash-2.05b/lib  -g -O2
uname output: Linux rockhopper 2.4.19 #1 Mon Aug 5 10:46:14 EST 2002 i686 
GNU/Linux
Machine Type: i386-pc-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
        quote removal not performed in arithmetic expansion before
        arthmetic expression calculated

        eg:
        echo $((1+'1'))
        echo $((1+"1"))
        echo $((1+\1))

        all result in syntax errors.

        According to POSIX 2.6.4 (Arithmetic expression)

        The expression shall be treated as if it were in
        double-quotes, except that a double-quote inside the
        expression is not treated specially. The shell shall expand
        all tokens in the expression for parameter expansion, command
        substitution, and quote removal.

        
http://www.opengroup.org/onlinepubs/007904975/utilities/xcu_chap02.html#tag_02_06_04





reply via email to

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