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. 【转】Intellij IDEA 14中使用MyBatis-generator 自动生成MyBatis代码

    Intellij IDEA 14 作为Java IDE 神器,接触后发现,非常好用,对它爱不释手,打算离开eclipse和myeclipse,投入Intellij IDEA的怀抱. 然而在使用的过程中 ...

  2. 【转】Android Studio系列教程六--Gradle多渠道打包

    原文链接:http://stormzhang.com/devtools/2015/01/15/android-studio-tutorial6/ 由于国内Android市场众多渠道,为了统计每个渠道的 ...

  3. javascript实现简单多文件上传

    该上传功能主要用到html5新属性FormData,通过XMLHttpRequest对象send到服务器,支持文件多选和多次选择.文件去重.移除已选文件等 1.html代码 <div class ...

  4. [转]odoo常用openerp-server.conf配置参数详解

    参数 说明 用法 addons_path addons模块的查找路径,多个路径用逗号分隔 addons_path = E:\GreenOdoo8.0\source\openerp\addons csv ...

  5. 关于 iOS 加密的一些详谈

    iOS 加密算法有那么几种,如 md5,sha1,AES,base64 和 rsa 等. 1. md5: MD5即Message-Digest Algorithm 5(信息-摘要算法5),用于确保信息 ...

  6. Sql常用语法以及名词解释

    Sql常用语法以及名词解释 SQL分类: DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE) DML—数据操纵语言(SELECT,DELETE,UPDATE,INSERT) D ...

  7. TreeView checkbox 全选

    在使用TreeView 控件 ,进行权限管理的时候,需要使用 checkbox全选. 勾选父节点,子节点全部选中.取消父节点,子节点不选中. 勾选子节点,父节点也选中. 以下是在使用的例子: < ...

  8. JupyterNotebook如何添加table of content

    不要总是等待,而是去创造 方法一 ipython notebook升级成了jupyter notebook,在4.x之后的版本,jupyter提供了jupyter-nbextension命令来安装和启 ...

  9. html学习第一天笔记

    语义化,让你的网页更好的被搜索引擎理解在这一章节我们要开始把网页中常用到的标签一 一向大家介绍,学习这一章节的时候要记住学习html标签过程中,主要注意两个方面的学习:标签的用途.标签在浏览器中的默认 ...

  10. TGridPanel做一个自动按比例缩放的窗体

    object grdpnlAdd: TGridPanel Left = Top = Width = Height = Align = alClient //重要 BevelOuter = bvNone ...