官方解释
NAME
pt-align - Align output from other tools to columns.
SYNOPSIS
Usage
pt-align [FILES]
pt-align aligns output from other tools to columns. If no FILES are specified, STDIN is read.
If a tool prints the following output,
一个简单的格式化展示工具
[root@slave159 opt]# pt-align --help
pt-align aligns output from other tools to columns. If no FILES are specified,
STDIN is read. For more details, please use the --help option, or try 'perldoc
/usr/local/bin/pt-align' for complete documentation.
Usage: pt-align [FILES]
Options:
--help Show help and exit
--version Show version and exit
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Rules:
This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details.
Options and values after processing arguments:
--help TRUE
--version FALSE
例如
[root@slave159 opt]# cat t.txt
zhangsan shanxi 23
lizi taiwan 32
wangwu xianggang 33
[root@slave159 opt]#
[root@slave159 opt]#
[root@slave159 opt]# pt-align t.txt
zhangsan shanxi 23
lizi taiwan 32
wangwu xianggang 33
[root@slave159 opt]#