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

  • 相关阅读:
    AGC007题解
    博弈论学习笔记
    ZROI2019 提高十连测
    男人八题2019
    LOJ 2840「JOISC 2018 Day 4」糖
    CF671D Roads in Yusland
    网络流套路小结
    BZOJ 3729 GTY的游戏
    AGC036C GP 2
    BZOJ 5046 分糖果游戏
  • 原文地址:https://www.cnblogs.com/hanrp/p/14338813.html
Copyright © 2011-2022 走看看