• 每天一个Linux命令—— WC


    一、首先看一下帮助

      Usage: wc [OPTION]... [FILE]...
        or:  wc [OPTION]... --files0-from=F
      Print newline, word, and byte counts for each FILE, and a total line if
      more than one FILE is specified.  With no FILE, or when FILE is -,
      read standard input.
        -c, --bytes            print the byte counts
        -m, --chars            print the character counts
        -l, --lines            print the newline counts
            --files0-from=F    read input from the files specified by
                               NUL-terminated names in file F;
                               If F is - then read names from standard input
        -L, --max-line-length  print the length of the longest line
        -w, --words            print the word counts
            --help     display this help and exit
            --version  output version information and exit

    二、根据帮助得知wc命令使用方法

      用法:wc [选项]...[文件]...

      或者是:wc [选项]... --files0-from=F

      打印文件中的行数,单词数以及字节数,如果指定多个文件,则可以统计所有文件的行数。如果没有文件或者文件是-,则读取标准输入

      参数释义:  

          -c   --bytes  统计并打印字节数

          -m  --chars  统计并打印字符数

          -l    --lines   统计宾打印行数

              --files0-from=F  从指定的以NUL-结尾的文件F中读取输入,如果F是- 则从标准输入中读取名字

           -L,   --max-line-length    打印长度最长的行内容

           -w,   --words               打印文件中单词数

                   --help            打印帮助信息并退出

                   --version           打印版本信息并退出

  • 相关阅读:
    记一次rabbitmq 消息不能接收故障的处理
    wundergraph 开源了
    dremio logback 几个配置文件简单说明
    nginx 提供的MARA参考架构
    openresty sse 动态扩展处理
    基于nchan 构建可靠的websocket 服务
    nodejs stream 背压处理学习
    rrun+juicefs 进行nodejs 模块的运行
    haproxy 2.6 发布
    top10 nginx 配置问题
  • 原文地址:https://www.cnblogs.com/MrFee/p/4682988.html
Copyright © 2020-2023  润新知