str=Alcatel_EMS
sed -n '/
情况如下: 文件行以时间戳开头,时间戳格式为[yymmdd hh:mm:ss ms],如[071112 13:20:34 341] 1.日期段yymmdd可能有也可能没有 2.毫秒段可能为1-3位 3.时间段的小时和分钟部分以参数形式传入 要求在文件中找到含时间戳的行,问题1和3用了各种办法都没有解决,请各位帮忙,谢谢了! 第3个问题已解决,第一个怎么做?[0-9]\{6\}?似乎不对 另,环境和平台是ksh@SunOS 5.9@sparc sun workstation,4楼的兄弟给的答案不管用,不知有没...
搞不定了 请教 00:03:34 [test31][啊旱灾bb] CharInfoSave : Class=48 Level=400 LVPoint=0 Exp=3822148080 Str=2320 Dex=331 Vit=167 Energy=79 Leadership:0 Map=2 Pk=3 00:03:34 [dck31][大点的d风荷] MasterLevel Info Save [MLevel:0][MLExp:0][MLNextExp:35507050][MLPoint:0] grep匹配 以 时间 [][] 开始的行 后面不包含[] 以 时间 [][] 开始 后面包含[] 的行 谢谢. [ 本帖最后由 moartel 于 2009-6-4 15:30 编辑 ]
某文件格式
N
我一个变量myvar里面包含很多非常见字符,也含有\ $ " ' 以及空格之类的字符 我要用 grep "$myvar" filename 功能 应该怎样写. 如果用单引号的话,$就不起作用了。 我这里没有gnu的工具
best output co. ltd. c/o norsk industry ltd.
best output co. ltd. c o norsk industry ltd.
best ring industrial co. c/o flying wings transportation ltd.
best ring industrial co. c o flying wings transportation ltd.
best ring industrial co. c/o flying wings transportation ltd
best ring industrial co. c o flying wings transportation ltd
putty情况下
搜索含有c/o的命令是 grep '\
从web日志中取出包含 GET /?test HTTP 和 GET /?test/* HTTP (*代表任意字符) 我尝试了一下grep 'GET /?test/* HTTP' xxx.txt 不知道为什么一行也选不出来,(即使可以还没有包括GET /?test HTTP的情况) xxx.txt大致是这样 $cat xxx.txt afsdafa GET /?test/xxxx HTTP sddsfasf afsdafa GET /?test HTTP sddsfasf 请大家帮忙看看,谢谢!