Chinaunix首页 | 论坛 | 博客
  • 博客访问: 798531
  • 博文数量: 50
  • 博客积分: 757
  • 博客等级: 上士
  • 技术积分: 1913
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-29 14:29
个人简介

DBA

文章分类

全部博文(50)

文章存档

2015年(3)

2014年(2)

2013年(14)

2012年(19)

2011年(12)

分类: Python/Ruby

2011-08-04 15:35:39

*********
123123
123123
*********
321321
321321
*********
456456
456456
*********
123123
123123
********

匹配123,取出******区间的内容

  1. awk -vRS="*+" '/123/{print RT$0}' file
RS          The input record separator, by default a newline(\n).
RT          The record terminator.  Gawk sets RT to the input text that matched the character or regular expression specified by RS.
阅读(3067) | 评论(1) | 转发(0) |
0

上一篇:mysql ROW_COUNT()

下一篇:处理文件最后一行

给主人留下些什么吧!~~

燃烧的小明2014-02-24 16:24:39

grep -v "\*"?