zoukankan      html  css  js  c++  java
  • cat显示指定行

    从第3行开始,一共显示5行。即显示3~8行

    cat bblayers.conf | tail -n +3 | head -n 5

     1 etouch@etouch-T410:~/work-hanrp/rcarm3/linux/Renesas/build/conf$ cat bblayers.conf 
     2 # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
     3 # changes incompatibly
     4 POKY_BBLAYERS_CONF_VERSION = "2"
     5 
     6 BBPATH = "${TOPDIR}"
     7 BBFILES ?= ""
     8 
     9 BBLAYERS ?= " 
    10   ${TOPDIR}/../poky/meta 
    11   ${TOPDIR}/../poky/meta-poky 
    12   ${TOPDIR}/../poky/meta-yocto-bsp 
    13   ${TOPDIR}/../meta-renesas/meta-rcar-gen3 
    14   ${TOPDIR}/../meta-openembedded/meta-oe 
    15   ${TOPDIR}/../meta-linaro/meta-optee 
    16   "
    17 etouch@etouch-T410:~/work-hanrp/rcarm3/linux/Renesas/build/conf$ cat bblayers.conf | tail -n +3 | head -n 5
    18 POKY_BBLAYERS_CONF_VERSION = "2"
    19 
    20 BBPATH = "${TOPDIR}"
    21 BBFILES ?= ""
    22 
    23 etouch@etouch-T410:~/work-hanrp/rcarm3/linux/Renesas/build/conf$

    分解:

        tail -n 1000:显示最后1000行

        tail -n +1000:从1000行开始显示,显示1000行以后的

        head -n 1000:显示前面1000行

    参考:https://www.cnblogs.com/suanec/p/5881463.html

  • 相关阅读:
    N!的位数
    c语言memset()函数
    通宵教室(ACM水题)
    欧拉函数+素数筛
    快速幂+大数取模
    观光浏览
    插入类排序(直接插入排序)
    showDoc使用方法
    $_POST与input('post.')区别
    “三日”面试官心得
  • 原文地址:https://www.cnblogs.com/hanrp/p/14338813.html
Copyright © 2011-2022 走看看