zoukankan      html  css  js  c++  java
  • 发现一个对列排版挺好用的命令:column

    help

    [root@hdpool1 tmp]# column -h
    
    Usage:
     column [options] [file ...]
    
    Options:
     -c, --columns <width>    width of output in number of characters
     -t, --table              create a table
     -s, --separator <string> possible table delimiters
     -o, --output-separator <string>
                              table output column separator, default is two spaces
     -x, --fillrows           fill rows before columns
    
     -h, --help     display this help and exit
     -V, --version  output version information and exit
    
    For more details see column(1).
    

    eg.

    [root@hdpool1 bin]# cat rds.log | column -t
    BackupOssLogSize   :  20062119710
    BackupOssDataSize  :  37176230912
    DBInstanceId       :  rm-bp10wsh06XXXXXXX
    RequestId          :  4FF90B38-CD0E-4B1A-9BCC-62A407827A24
    LogSize            :  1078984704
    DataSize           :  49582964736
    ColdBackupSize     :  -1
    SQLSize            :  -1
    BackupSize         :  57238350622
    DiskUsed           :  50661949440
    [root@hdpool1 bin]# 
    [root@hdpool1 bin]# 
    [root@hdpool1 bin]# cat rds.log | column -s ':' -t
    BackupOssLogSize     20062119710
    BackupOssDataSize    37176230912
    DBInstanceId         rm-bp10wsh06XXXXXXX
    RequestId            4FF90B38-CD0E-4B1A-9BCC-62A407827A24
    LogSize              1078984704
    DataSize             49582964736
    ColdBackupSize       -1
    SQLSize              -1
    BackupSize           57238350622
    DiskUsed             50661949440
    [root@hdpool1 bin]#
    

      

  • 相关阅读:
    Python反射机制
    并发和并行的区别
    I/O模型
    python 字符串零散方法记录
    python 关于占位符格式化
    Python 十进制转二进制、八进制、十六进制
    python中str函数isdigit、isdecimal、isnumeric的区别
    文件的修改
    LF 模块三
    stackoverflow os.path.abspath and os.path.realpath
  • 原文地址:https://www.cnblogs.com/chenglee/p/11847043.html
Copyright © 2011-2022 走看看