Chinaunix

标题: 下面两个表达式有什么区别? [打印本页]

作者: polestar_li    时间: 2012-04-30 17:10
标题: 下面两个表达式有什么区别?
1. grep -n "^$" file
2. grep -n "^[$]" file
作者: jason680    时间: 2012-04-30 17:25
shell 十三問?
Part-II: Regular Expression

作者: polestar_li    时间: 2012-04-30 19:01
jason680 发表于 2012-04-30 17:25
shell 十三問?
Part-II: Regular Expression


谢谢,能给链接吗?只看到PartI,没找到Part II
作者: Shell_HAT    时间: 2012-04-30 19:16
本帖最后由 Shell_HAT 于 2012-04-30 19:17 编辑

# cat -n urfile
     1  a
     2  b
     3
     4  $a
# grep -n "^$" urfile
3:
5:
# grep -n "^[$]" urfile
4:$a

作者: waker    时间: 2012-04-30 19:59
polestar_li 发表于 2012-04-30 19:01
谢谢,能给链接吗?只看到PartI,没找到Part II


http://bbs.chinaunix.net/tree/index_100_1/




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2