- 论坛徽章:
- 1
|
我用的fedora13 bash版本是4.1.2
通过echo $SHELL 和 echo $0 确认当前使用的是bash。
终端或者脚本中执 ...
face0105 发表于 2010-10-09 22:03
在fedora 11中一切正常。
$ [[ "123456" =~ '^[0-9]{1,}$' ]] && echo 0 || echo 1
0
$ bash --version
GNU bash, version 4.0.23(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. |
|