1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-31 10:55:39 +02:00
tldr/pages.ja/common/column.md

22 lines
802 B
Markdown
Raw Normal View History

# column
> `stdin` またはファイルを複数の列にフォーマットします。
> デフォルトの区切り文字は空白文字です。
> もっと詳しく: <https://manned.org/column>。
- 30文字幅の表示用にコマンドの出力をフォーマットする:
`printf "header1 header2\nbar foo\n" | column --output-width {{30}}`
- カラムを自動的に分割し、表形式に自動整列する:
`printf "header1 header2\nbar foo\n" | column --table`
- `table`オプションにカラムの区切り文字を指定する(CSVの場合は","など) (デフォルトは空白文字):
`printf "header1,header2\nbar,foo\n" | column --table --separator {{,}}`
- 列を埋める前に行を埋める:
`printf "header1\nbar\nfoobar\n" | column --output-width {{30}} --fillrows`