哪里有bash里正则表达式的用法说明
发表于 : 2011-02-17 1:16
像*.rm?(vb)或*[[:space:]]*等等用法哪里可以找到文档
最好中文的
@用在bash的正则表达式里是什么意思啊
|是不是只能在?()里用?
最好中文的
@用在bash的正则表达式里是什么意思啊
|是不是只能在?()里用?
代码: 全选
sudo aptitude install manpages-zh
man bash
/extglob
这不算正则表达式,man bashsunsol 写了:鸟哥那个讲的是grep和sed里的正则表达式
我问的是bash的
像ls *.rm?(vb)
或ls *[[:space:]]*列出带空白的文件
这样的正则表达式
Bash里后来加的正则支持是egrep的。eexpress 写了:bash后面才支持的,使用 [[ ]] 包括的正则。那弱的很的。其他各种正则,都是perl正则的子集。
你就当是grep的正则吧,还别当是egrep的哦。
代码: 全选
An additional binary operator, =~, is available, with
the same precedence as == and !=. When it is used, the
string to the right of the operator is considered an
[b]extended[/b] regular expression and matched accordingly