zoukankan      html  css  js  c++  java
  • Linux cat命令

    介绍

    cat命令经常会用来查看一个文件的内容,并且结合它本身的一些参数经常可以用来做一些特殊的内容处理。

    参数

    Usage: cat [OPTION]... [FILE]...
    Concatenate FILE(s), or standard input, to standard output.
    
      -A, --show-all           等同于使用参数-vET
      -b, --number-nonblank    针对非空行显示行号
      -e                       等同于使用参数 -vE
      -E, --show-ends          每行以$结尾
    -n, --number 每行都显示行号 -s, --squeeze-blank 将连续的多个空行以显示一个空行 -t 等同于使用参数 -vT -T, --show-tabs 制表符(tab)以^I符合代替 -u (ignored) -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB --help display this help and exit --version output version information and exit With no FILE, or when FILE is -, read standard input. Examples: cat f - g Output f's contents, then standard input, then g's contents. cat Copy standard input to standard output.

    1.查看多个文件内容

    2.显示行号

    3.压缩空行

    4.不显示空行

    总结

    备注:

        作者:pursuer.chen

        博客:http://www.cnblogs.com/chenmh

    本站点所有随笔都是原创,欢迎大家转载;但转载时必须注明文章来源,且在文章开头明显处给明链接。

    《欢迎交流讨论》

  • 相关阅读:
    spring基础
    hibernate基础
    struts2基础
    javaEE(17)_邮件原理与JavaMail开发
    javase(14)_java基础增强
    javase(13)_网络编程
    javase(12)_集合框架_Queue
    C++:memset ,memcpy 和strcpy 的根本区别!
    16位的二进制数,每4位为一个数,写函数求他们的和
    态度!!!
  • 原文地址:https://www.cnblogs.com/chenmh/p/5489850.html
Copyright © 2011-2022 走看看