论坛风格切换切换到宽版
  • 901阅读
  • 5回复

[问题求助][RedHat] 请教——按书上写grep -n [^0-9] regular.txt的问题 [复制链接]

上一主题 下一主题
离线korey.
 
发帖
2026
C币
-235337
威望
391
贡献值
1
银元
-3
铜钱
4680
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-05-01
学习grep命令 .    grep -n [^0-9] regular.txt    我.输出的结果是全部 按语法不是应该排除掉带数字的行么  比如31.83那行--------------彩票

r.egular.txt 的内容 .
"Open .Source" is a good mechanism to develop program.s..
apple is. my favorite food...
F.ootball. game is not use feet only.             电子
this dre.ss doesn't fit m.e.
Howe.ver, this dress is about $ 3183 dol.lars.
GNU is free. .air not free beer..
Her hair is very .beauty..
I ca.n't finish the test.服务器
Oh! T.he soup taste good.--- 印刷
mo.torcycl.e is cheap than car.             汽车
T.his window is clear.    美容
the symb.ol '*' is represented as .start.电脑
Oh!       . My god!.
The gd software is a l.ib.rary for drafting programs.[成人用品]
You are .the best is mean you are the no.. 1..
Th.e world <Happy> i.s the same with "glad"..
I like dog.
google is the best tool.s for search. keyword.           女人
gooo.ooogle yes!.
go! go.! Let's go..
# I am VBird



我的操作
[root@Kungfu new folder]# grep -n .[^0-9.] regular_express.txt              汽车
1:"Open Source" is a good mech.anism to develo.p programs.    健康
2.:ap.ple is my favorite food..
3:Footba.ll game is not use feet on.ly.服务器
4:this dress doesn't fit .me..电脑
5.:However, t.his dress is about $ 3183 dollars.域名
6:GNU. is fre.e air not free beer..
7:Her .hair is very bea.uty.健康
8:I can't. finish the test..域名
9.:Oh! The soup taste go.od.            杀毒
10:motorcycle .is cheap than car...
11:This .window is clear.    美容
1.2:the symbol '*' is represented as start..[成人用品]
13:Oh!  My g.od!外贸
14:The gd software is a library for dra.fting progr.ams.           女人
15:You. are the .best is mean you are the no. 1.--- 印刷
16:The world <Happy> is the same with. "gl.ad".服务器
17:I like dog.
18:goog.le is the best tools for search key.word.(        游戏          )
19:goooooogle. yes!电影
20:go! go! Let's g.o..
21:# I am VBir.d

[ 本帖最后由 .deepbreathingin 于 2009-3-9 21:37 编辑 .]外贸

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
离线hackerstudy.
发帖
2066
C币
-193385
威望
377
贡献值
1
银元
-2
铜钱
4603
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-13
Re:[RedHat]
grep -v '[0-9]' urfile

离线問號.
发帖
2009
C币
-627237
威望
377
贡献值
4
银元
-1
铜钱
4493
人人网人气币
0
只看该作者 板凳  发表于: 2010-04-13
Re:[RedHat]
感谢高手! 但是我的写的grep语句逻辑上哪有错,为什么会全部输出呢?





QUOTE:原帖由 leetaedong 于 2009-3-9 21:40 发表
grep -v '[0-9]' urfile


离线alantam.
发帖
2031
C币
-60567
威望
364
贡献值
1
银元
-2
铜钱
4519
人人网人气币
0
只看该作者 地板  发表于: 2010-04-13
Re:[RedHat]


QUOTE:原帖由 deepbreathingin 于 2009-3-9 21:43 发表
感谢高手! 但是我的写的grep语句逻辑上哪有错,为什么会全部输出呢?





那不是你要的意思...  ^ 跟 - 好像也不能混一起..

离线yeats520.
发帖
2217
C币
-151825
威望
453
贡献值
1
银元
-3
铜钱
5084
人人网人气币
0
只看该作者 4楼 发表于: 2010-04-13
Re:[RedHat]
非常感谢你!!  学习到了


QUOTE:原帖由 leetaedong 于 2009-3-9 21:47 发表

那不是你要的意思...  ^ 跟 - 好像也不能混一起..


离线rayabbie.
发帖
2143
C币
-60307
威望
385
贡献值
1
银元
-1
铜钱
4705
人人网人气币
0
只看该作者 5楼 发表于: 2010-04-13
Re:[RedHat]
grep -n [0-9] regular.txt
快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
上一个 下一个