zoukankan      html  css  js  c++  java
  • awk 命令

    用法:awk [POSIX 或 GNU 风格选项] -f 脚本文件 [--] 文件 ...
    用法:awk [POSIX 或 GNU 风格选项] [--] '程序' 文件 ...
    POSIX 选项:            GNU 长选项:(标准)
            -f 脚本文件             --file=脚本文件
            -F fs                   --field-separator=fs
            -v var=val              --assign=var=val
    短选项:                GNU 长选项:(扩展)
            -b                      --characters-as-bytes
            -c                      --traditional
            -C                      --copyright
            -d[文件]                --dump-variables[=文件]
            -D[文件]                --debug[=文件]
            -e '程序文本'   --source='程序文本'
            -E 文件                 --exec=文件
            -g                      --gen-pot
            -h                      --help
            -i 包含文件             --include=包含文件
            -l 库           --load=库
            -L[fatal|invalid|no-ext]        --lint[=fatal|invalid|no-ext]
            -M                      --bignum
            -N                      --use-lc-numeric
            -n                      --non-decimal-data
            -o[文件]                --pretty-print[=文件]
            -O                      --optimize
            -p[文件]                --profile[=文件]
            -P                      --posix
            -r                      --re-interval
            -s                      --no-optimize
            -S                      --sandbox
            -t                      --lint-old
            -V                      --version
    
    To report bugs, see node `Bugs' in `gawk.info'
    which is section `Reporting Problems and Bugs' in the
    printed version.  This same information may be found at
    https://www.gnu.org/software/gawk/manual/html_node/Bugs.html.
    PLEASE do NOT try to report bugs by posting in comp.lang.awk,
    or by using a web forum such as Stack Overflow.
    
    gawk 是一个模式扫描及处理语言。缺省情况下它从标准输入读入并写至标准输出。
    
    范例:
            gawk '{ sum += $1 }; END { print sum }' file
            gawk -F: '{ print $1 }' /etc/passwd
    
    
    
  • 相关阅读:
    Google Protocol Buffer
    你不知道的JSON的高效率用法
    ContentProvider深度探索
    Messenger实现Android IPC
    AIDL实现Android IPC
    多点触控
    Service通信详解
    并行执行的Service,以媒体转码成新格式为例
    相对完美的后台Service实现播放音乐功能
    用Dalvik指令集写个java类
  • 原文地址:https://www.cnblogs.com/msvc/p/11306404.html
Copyright © 2011-2022 走看看