看书遇到关于grep指令问题
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- apple1900
- 帖子: 31
- 注册时间: 2011-10-17 9:09
看书遇到关于grep指令问题
知识点:通配符【^abc】代表一定有一个字符,只要非a,b,c的其他字符就可以
现在有一文件regular_express.txt内容如下
"Open Source" is a good mechanism to develop programs.
apple is my favorite food.
Football game is not use feet only.
this dress doesn't fit me.
However, this dress is about $ 3183 dollars.
GNU is free air not free beer.
Her hair is very beauty.
I can't finish the test.
Oh! The soup taste good.
motorcycle is cheap than car.
This window is clear.
the symbol '*' is represented as start.
Oh! My god!
The gd software is a library for drafting programs.
You are the best is mean you are the no. 1.
The world <Happy> is the same with "glad".
I like dog.
google is the best tools for search keyword.
goooooogle yes!
go! go! Let's go.
# I am VBird
(注:最后一行是空的)
为什么grep -n 'the' regular_express.txt 和grep -n '^the' regular_express.txt 都能搜索到
12:the symbol '*' is represented as start.??????
现在有一文件regular_express.txt内容如下
"Open Source" is a good mechanism to develop programs.
apple is my favorite food.
Football game is not use feet only.
this dress doesn't fit me.
However, this dress is about $ 3183 dollars.
GNU is free air not free beer.
Her hair is very beauty.
I can't finish the test.
Oh! The soup taste good.
motorcycle is cheap than car.
This window is clear.
the symbol '*' is represented as start.
Oh! My god!
The gd software is a library for drafting programs.
You are the best is mean you are the no. 1.
The world <Happy> is the same with "glad".
I like dog.
google is the best tools for search keyword.
goooooogle yes!
go! go! Let's go.
# I am VBird
(注:最后一行是空的)
为什么grep -n 'the' regular_express.txt 和grep -n '^the' regular_express.txt 都能搜索到
12:the symbol '*' is represented as start.??????
我是菜虫,比菜鸟还菜……
- shiznet
- 帖子: 7
- 注册时间: 2010-11-14 16:45
Re: 看书遇到关于grep指令问题
感觉没啥问题啊
- Fermat618
- 帖子: 728
- 注册时间: 2008-12-28 16:01
- msos
- 帖子: 148
- 注册时间: 2011-11-28 22:22
Re: 看书遇到关于grep指令问题
看不懂,来围观,留名字
- lilydjwg
- 论坛版主
- 帖子: 4258
- 注册时间: 2009-04-11 23:46
- 系统: Arch Linux
- 联系:
Re: 看书遇到关于grep指令问题
那个叫六角括号。Fermat618 写了:有方括号还是没方括号,这是个问题。
- naturalaw
- 帖子: 1360
- 注册时间: 2011-09-06 22:04
- 懒蜗牛Gentoo
- 论坛版主
- 帖子: 7362
- 注册时间: 2007-03-02 17:36
- 系统: Linux Mint
- apple1900
- 帖子: 31
- 注册时间: 2011-10-17 9:09
- apple1900
- 帖子: 31
- 注册时间: 2011-10-17 9:09
- apple1900
- 帖子: 31
- 注册时间: 2011-10-17 9:09
- apple1900
- 帖子: 31
- 注册时间: 2011-10-17 9:09