ChinaUnix.net
相关文章推荐:

shell 查找特定的字符串

我想用shell脚本,查找 “当启动一个进程时,可能会提示:“打开共享内存出错”;这个信息会输出到屏幕上,我想做的事,只要有:“打开共享内存出错”;这一段信息,则,自动执行一个cd .. 命令, 不知道如何做啦! 高手指点呀!

by freeskyo - 其他UNIX - 2010-05-14 12:19:53 阅读(3054) 回复(3)

相关讨论

文本文件tmp.txt中含有一下内容 cd $AICBS22/vgroup/busivpmn/server/atmi/;gmake -f Makefile.test clean;gmake -f Makefile.test cd $AICBS22/vgroup/busivpmn/server/atmi/test/source/;gmake -f Makefile clean;gmake -f Makefile cd $AICBS22/vgroup/busivpmn/server/mgr/;gmake -f Makefile clean;gmake -f Makefile cd $AICBS22/vgroup/busivpmn/server/mgr/;gmake -f Makefile.mml clean;gmake -f Makefile.mml cd $AICBS2...

by mjykyo - Shell - 2009-04-27 17:20:56 阅读(2189) 回复(4)

如文件如下: ================= sf safsaf sf sfd sdfsfddfocustedasf safsafd safwprwq pwqedsa 如要找出含有字符串"focus" 的行并且其上下5行,这个shell怎么写呢? 请教.

by tomasfly88 - Shell - 2008-07-25 23:56:08 阅读(3277) 回复(25)

有类似这样的一个文件,在其中找连续的三行并且是有特定内容, name test ........ ................... 1111 (aaa)xxxxxxx 1111 (bbb)xxxx 1111 (aaa)xxxxxxxxxxx ....... ..................... 就是在这里面找连续三行开头是红色部分 (aaa)...

by clory_0 - Shell - 2006-01-21 10:50:19 阅读(1294) 回复(6)

想在本目录(包含子目录)下查找所有含test字符串的*.cpp文件shell怎么写 怎么用grep命令

by sunday1207 - HP-UX - 2006-09-19 23:57:12 阅读(1588) 回复(5)

grep "test" *cpp,这样只能找到本目录下的,但是子目录下的查找不出来

by sunday1207 - 系统管理 - 2006-09-18 14:20:14 阅读(751) 回复(3)

现有一文本aa.txt包含如下4条记录,且第一个域的值唯一 101544010000029|515440001;201544000000000 515440001| 201544000000000|515440001;101544010000019 101544010000019|515440001 我想在aa.txt中查找包含"101544010000029|"的行,并且将字符串";101544010000019"添加至"101544010000029|"所在行的行尾,以达到如下效果: 101544010000029|515440001;201544000000000;101544010000019 515440001| 201544000000000|515440001;...

by wing318 - Shell - 2007-04-27 16:31:22 阅读(2794) 回复(5)
by todayhero - Shell - 2009-01-19 22:16:43 阅读(1884) 回复(8)

在文件table.list中有如下内容, cat table.list ./tempdata/s_job_chain.txt ./tempdata/s_entity_info.txt ./tempdata/s_db_info.txt ./tempdata/s_job_cost.txt ./tempdata/s_datamng_log.txt ./tempdata/s_audit_rule.txt ./tempdata/s_cnode_stat.txt ./tempdata/s_instance_stat.txt ./tempdata/h_instance_info.txt ./tempdata/s_ds_jobparam.txt ./tempdata/s_job_attr.txt ./tempdata/h_job_info.txt ./tempdata/s_refer_...

by legone2008 - Shell - 2008-08-29 02:18:17 阅读(5549) 回复(8)

"2008-4-2" 怎样变成 2008-4-2 也就是把分号去掉

by qwldcl - Shell - 2008-05-19 13:35:25 阅读(2298) 回复(10)

关于shell中的字符串。 比如 #test="abc def" 现在要得到"abc"怎么做呢? #echo ${test%% *} abc 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/17004/showart_469647.html

by shiwudao - HP文档中心 - 2008-01-22 22:52:17 阅读(1188) 回复(0)