TL; DR
より一貫した結果を得るためではなく、paste/の組み合わせの使用を検討してください。columnpr
フォーマット:
paste <(cmd1) <(cmd2) | column -s $'\t' -t
詳細な説明
pasteとcolumnコマンドの組み合わせにより、非常に堅牢なソリューションが可能になります。
paste/ columnアプローチの利点pr:
具体例:
paste <(ls -1 .) <(ls -1 ..) | column -s $'\t' -t
Ubuntu 16.04 でのpaste/ columnテクニックの実際の出力:
jay-z@jaytaylor.com:~/go/src/github.com/jaytaylor/html2text
$ paste <(ls -1 .) <(ls -1 ..) | column -s $'\t' -t
LICENSE archiveify
README.md go-hostsfile
html2text.go html2text
html2text_test.go jaytaylor
testdata mockery-example
shipbuilder
stoppableListener
tesseract-web
比較用:prさまざまなプラットフォーム
TL; DR: pr Linuxフレーバー間で動作に一貫性がありません。
Ubuntuのprバージョンの出力:
jay-z@jaytaylor.com:~/go/src/github.com/jaytaylor/html2text
$ pr -m <(ls -1 .) <(ls -1 ..)
2017-05-25 15:50 /dev/fd/62 Page 1
LICENSE archiveify
README.md go-hostsfile
html2text.go html2text
html2text_test.go jaytaylor
testdata mockery-example
shipbuilder
stoppableListener
tesseract-web
OS X / macOsでのprバージョンの出力:
jay-z@jaytaylor.com:~/go/src/github.com/jaytaylor/html2text
$ pr -m <(ls -1 .) <(ls -1 ..)
May 25 08:55 2017 Page 1
LICENSE archiveify
README.md go-hostsfile
html2text.go html2text
html2text_test.go jaytaylor
testdata mockery-example
shipbuilder
stoppableListener
tesseract-web
<... remainder of screen filled with blank lines ...>
出力prにバージョンCentOSに:
(驚くことに、prCentos 7 の下での動作は、テストされた他のすべてのプラットフォームの動作とは異なります)
jay-z@jaytaylor.com:~/go/src/github.com/jaytaylor/html2text
$ pr <(ls -1 .) <(ls -1 ..)
2017-05-25 15:59 /dev/fd/63 Page 1
LICENSE
README.md
html2text.go
html2text_test.go
testdata
<... remainder of screen filled with blank lines ...>
2017-05-25 16:21 /dev/fd/62 Page 1
archiveify
go-hostsfile
html2text
jaytaylor
mockery-example
shipbuilder
stoppableListener
tesseract-web
<... remainder of screen filled with blank lines ...>
pr -mを使用できますpaste。