File content:

<a href="ceph-0.80.9-82.1.x86_64.rpm"><img src="/icons/rpm.gif" alt="[   ]" width="16" height="16" /></a> <a href="ceph-0.80.9-82.1.x86_64.rpm">ceph-0.80.9-82.1.x86_64.rpm</a>                                     11-Jun-2015 16:37  9.9M   <a href="ceph-0.80.9-82.1.x86_64.rpm.mirrorlist">Details</a>
<a href="ceph-common-0.80.9-82.1.x86_64.rpm"><img src="/icons/rpm.gif" alt="[   ]" width="16" height="16" /></a> <a href="ceph-common-0.80.9-82.1.x86_64.rpm">ceph-common-0.80.9-82.1.x86_64.rpm</a>                              11-Jun-2015 16:37  3.9M   <a href="ceph-common-0.80.9-82.1.x86_64.rpm.mirrorlist">Details</a>
<a href="ceph-common-debuginfo-0.80.9-82.1.x86_64.rpm"><img src="/icons/rpm.gif" alt="[   ]" width="16" height="16" /></a> <a href="ceph-common-debuginfo-0.80.9-82.1.x86_64.rpm">ceph-common-debuginfo-0.80.9-82.1.x86_64.rpm</a>                    11-Jun-2015 16:37   49M   <a href="ceph-common-debuginfo-0.80.9-82.1.x86_64.rpm.mirrorlist">Details</a>

......

Command:

grep -P -o ">\K[^ ]+?x86_64.rpm" <file name>

-P : perl format regular expression

-o : only matched content

\K : throw away content of before \K

Result:

xen-doc-html-4.4.2_06-3.1.x86_64.rpm
xen-kmp-default-4.4.2_06_k3.12.28_4-3.1.x86_64.rpm
xen-kmp-default-debuginfo-4.4.2_06_k3.12.28_4-3.1.x86_64.rpm
xen-libs-4.4.2_06-3.1.x86_64.rpm
xen-libs-debuginfo-4.4.2_06-3.1.x86_64.rpm
xen-tools-4.4.2_06-3.1.x86_64.rpm
xen-tools-debuginfo-4.4.2_06-3.1.x86_64.rpm
xen-tools-domU-4.4.2_06-3.1.x86_64.rpm

How to only capute sub-matched character by grep的更多相关文章

  1. strtok strchr strrchr strchrnul

    NAME       strchr, strrchr, strchrnul - locate character in string SYNOPSIS       #include <strin ...

  2. 常用算法3 - 字符串查找/模式匹配算法(BF & KMP算法)

    相信我们都有在linux下查找文本内容的经历,比如当我们使用vim查找文本文件中的某个字或者某段话时,Linux很快做出反应并给出相应结果,特别方便快捷! 那么,我们有木有想过linux是如何在浩如烟 ...

  3. 归纳整理Linux下C语言常用的库函数----内存及字符串控制及操作

    在没有IDE的时候,记住一些常用的库函数的函数名.参数.基本用法及注意事项是很有必要的. 参照Linux_C_HS.chm的目录,我大致将常用的函数分为一下几类: 1. 内存及字符串控制及操作 2. ...

  4. js css 实现简单的计算器

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  5. CharUtil

    package com.opslab.util; import java.io.UnsupportedEncodingException; /** * Various character and ch ...

  6. man bash

    BASH(1) General Commands Manual BASH(1) NAME bash - GNU Bourne-Again SHell SYNOPSIS bash [options] [ ...

  7. R语言函数化学习笔记6

    R语言函数化学习笔记 1.apply函数 可以让list或者vector的元素依次执行一遍调用的函数,输出的结果是list格式 2.sapply函数 原理和list一样,但是输出的结果是一个向量的形式 ...

  8. Dive into re Module in Python

    Dive into RE in Python Standard re module in python is powerful to handle text manipulation,such as ...

  9. bash5.0参考手册

    Bash Reference Manual a.summary-letter { text-decoration: none } blockquote.indentedblock { margin-r ...

随机推荐

  1. Java enum的用法详解[转]

    Ref:http://www.cnblogs.com/happyPawpaw/archive/2013/04/09/3009553.html 用法一:常量 在JDK1.5 之前,我们定义常量都是: p ...

  2. userdel 连同家目录一起删除

    userdel -r xxx 连同家目录一起删除

  3. Tensorflow 实现稠密输入数据的逻辑回归二分类

    首先 实现一个尽可能少调用tf.nn模块儿的,自己手写相关的function     import tensorflow as tf import numpy as np import melt_da ...

  4. python IOError: [Errno 0] Error

    Windows系统下,此异常在以'a+'模式打开文件,读文件,再写入过程中出现.其原因在于读写交替过程中必须要有fflush, fseek, fsetpos, rewind这类操作,不然python就 ...

  5. 浅谈JAVA设计模式

    没有万行的代码量,就不要想搞清楚设计模式.目前本人代码量大约在六千五百行,2016年需要继续努力,尽快完成万行之约. 工作之余需要,下面提前简单讨论一下设计模式. 创建型模式,共五种:工厂模式.抽象工 ...

  6. 2016 Multi-University Training Contest 1 C.Game

    Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submis ...

  7. 1.0 多控制器管理(附:Demo)

    本文并非最终版本,如有更新或更正会第一时间置顶,联系方式详见文末 如果觉得本文内容过长,请前往本人 “简书”       控制器 :   一个iOS的app很少只由一个控制器组成,除非这个app极其简 ...

  8. 【原】iOS学习48地图

    一.地图的简介 在移动互联网时代,移动app能解决用户的很多生活琐事,比如 导航:去任意陌生的地方 周边:找餐馆.找酒店.找银行.找电影院 手机软件:微信摇一摇.QQ附近的人.微博.支付宝等 在上述应 ...

  9. 【BZOJ2157】旅游 LCT

    模板T,SB的DMoon..其实样例也是中国好样例...一开始不会复制,yangyang:找到“sample input”按住shift,按page down.... #include <ios ...

  10. windows环境 andorid JNI开发

    1.下载并安装GNUstep 下载地址:http://www.gnustep.org/experience/Windows.html 安装文件 a.GNUstep MSYS System   b.GN ...