awk来在Linux终端产出表状或类似Excel列? [英] awk to output table-like or excel-like columns in linux terminal?

查看:125
本文介绍了awk来在Linux终端产出表状或类似Excel列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做一个长管,以结束... | AWK'{打印5 $\\ t \\ t$ 3\\ t的$ 4}'在Linux终端。列填充为标签。第一列项具有不同数目的字符,所以第二列结果并不完全垂直。如何使表看起来完美?

I do a long pipe, that ends with ...| awk '{print $5"\t\t" $3"\t"$4}' in the Linux terminal. The columns are padded with tabs. The first column entries have different number of characters, so the second column results are not perfectly vertical. How to make the table look perfect?

推荐答案

尝试管道结果列-t:

...| awk '{print $5"\t\t" $3"\t"$4}'|column -t

希望它能帮助

这篇关于awk来在Linux终端产出表状或类似Excel列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆