文本文件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...
如文件如下: ================= sf safsaf sf sfd sdfsfddfocustedasf safsafd safwprwq pwqedsa 如要找出含有字符串"focus" 的行并且其上下5行,这个shell怎么写呢? 请教.
有类似这样的一个文件,在其中找连续的三行并且是有特定内容, name test ........ ................... 1111 (aaa)xxxxxxx 1111 (bbb)xxxx 1111 (aaa)xxxxxxxxxxx ....... ..................... 就是在这里面找连续三行开头是红色部分 (aaa)...
现有一文本aa.txt包含如下4条记录,且第一个域的值唯一 101544010000029|515440001;201544000000000 515440001| 201544000000000|515440001;101544010000019 101544010000019|515440001 我想在aa.txt中查找包含"101544010000029|"的行,并且将字符串";101544010000019"添加至"101544010000029|"所在行的行尾,以达到如下效果: 101544010000029|515440001;201544000000000;101544010000019 515440001| 201544000000000|515440001;...
在文件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_...
关于shell中的字符串。 比如 #test="abc def" 现在要得到"abc"怎么做呢? #echo ${test%% *} abc 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/17004/showart_469647.html