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]#
    

      

  • 相关阅读:
    CentOS7下安装Scrapy
    阿里云ECS提示RHSA-2017:3263: curl security update
    CentOS 7.0安装配置LAMP服务器(Apache+PHP+MariaDB)
    Electron: 从零开始写一个记事本app
    flask请求流程
    编写Dockerfile
    docker-compose使用
    redis持久化切换rdb到aof
    RESTful API规范
    介绍importlib
  • 原文地址:https://www.cnblogs.com/chenglee/p/11847043.html
Copyright © 2011-2022 走看看