码迷,mamicode.com
首页 > 其他好文 > 详细

发现一个对列排版挺好用的命令:column

时间:2019-11-13 10:46:05      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:har   ber   ssl   backup   bash   inf   -o   col   sep   

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

  

发现一个对列排版挺好用的命令:column

标签:har   ber   ssl   backup   bash   inf   -o   col   sep   

原文地址:https://www.cnblogs.com/chenglee/p/11847043.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!