[Date Prev ][Date Next ][Thread Prev ][Thread Next ][Date Index ][Thread Index ]
array subscripts act differently for integers(ie. let)
From :
emanuelczirai
Subject :
array subscripts act differently for integers(ie. let)
Date :
Mon, 16 Feb 2015 03:04:49 +0100
User-agent :
Roundcube Webmail
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib
-D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe
-fstack-protector-strong --param=ssp-buffer-size=4
-DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin'
-DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc'
-DSYS_BASH_LOGOUT='/etc/bash.bash_logout'
uname output: Linux manji 3.19.0-gbfa76d49 #28 SMP Mon Feb 9 14:29:14
CET 2015 x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu
Bash Version: 4.3
Patch Level: 33
Release Status: release
Description:
when dealing with integer operations(let, ++), "bad array subscript"
errors can happen because subscripts get unquoted (and evaluated even
though they are in single quotes); unlike what happens when dealing with
strings.
Repeat-By:
please see attached bash script to reproduce because that explains it
much better than I could in words.
Thank you.
subscripty_integer.bash
Description: Text Data
array subscripts act differently for integers(ie. let) ,
emanuelczirai <=
Re: array subscripts act differently for integers(ie. let) , Greg Wooledge , 2015/02/16
Re: array subscripts act differently for integers(ie. let) , emanuelczirai , 2015/02/18
Re: array subscripts act differently for integers(ie. let) , Eduardo A . Bustamante López , 2015/02/18
Re: array subscripts act differently for integers(ie. let) , Dan Douglas , 2015/02/18
Re: array subscripts act differently for integers(ie. let) , Chet Ramey , 2015/02/19