分页: 1 / 1

提一个关于$(( ))的问题

发表于 : 2008-11-23 10:18
qqttdh

代码: 全选

qqttdh@marx08:~$ s=$((08 - 1))
bash: 08: 基数值过大 (error token is "08")
qqttdh@marx08:~$ s=$((09 - 1))
bash: 09: 基数值过大 (error token is "09")
如上。。。何解。。。?

Re: 提一个关于$(( ))的问题

发表于 : 2008-11-23 11:38
qqttdh
http://www.linuxforums.org/forum/linux- ... -09-a.html
A convention in many situations is that numeric strings with a leading "0" are interpreted as octal.
:em02

Re: 提一个关于$(( ))的问题

发表于 : 2008-11-23 12:51
cnkilior
0开头的数字是8进制!