如何输入"^A"? grep "\001" filename 好像结果不对。请各位帮忙看看。谢了
by freeman_zhao - Shell - 2008-06-25 13:43:56 阅读(1053) 回复(6)
比方说一个程序运行时输出里含有aaa bbb ccc ddd的字样 我想grep出含有aaa或者ccc的行,应该怎么写? a.exe | grep "aaa" 只能滤出含有aaa的行 请高手指点。:oops::oops::oops::oops:
用last |grep root 时显示中有不少如下的内容: grep: 0652-226 Maximum line length of 2048 exceeded. 不知道是什么原因,如何解决?
Solaris 系统 判断 messages 中是否有WARNING和Error和Fail 这些报错,如有报错就将报错追加到一个文件中 egrep -e "WARNING|Error|Fail" /var/adm/messages >> $LOG 我想判断grep是否有输出,如没有输出,就显示 没有报警的信息。不知道该如何用if判断
我在用echo ` find ${DIR} -type f -print |xargs grep -l ${RetrievalContent} ` >> $TEMPFILE 命令输出文件时,文件没有自动换行,怎么能让它自动换行啊?
[code][root@ xinetd.d]# cat telnet # default: on # description: The telnet server serves telnet sessions; it uses \ # unencrypted username/password pairs for authentication. service telnet { disable = no flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/in.telnetd ...
本程序虽小,但还是挺有用的:)
用法:
./tgrep /usr/include SHM
[code]/*write by donald*/
#include
shell基础1:文件安全与权限 http://bbs.chinaunix.net/forum/viewtopic.php?t=434579&highlight=wingger 附:Linux的用户和用户组管理 http://bbs.chinaunix.net/forum/viewtopic.php?t=438660&highlight=wingger shell基础二:查找技巧,find及xargs的使用 http://bbs.chinaunix.net/forum/viewtopic.php?t=441883&highlight=wingger shell基础三和四:后台(crontab,at,&,nohup)及(*,?,[]等) http://bbs.chinaunix.net/for...
:shock: 查了半天,没找到与匹配的,只找到或匹配的例子。 问题和这个一样:要求匹配含有fred 和tom的行,用grep -E 无法实现? http://bbs.chinaunix.net/viewthread.php?tid=479709&extra=&highlight=grep%20%D3%EB%20%C6%A5%C5%E4&page=1