【发布时间】:2014-10-13 17:08:53
【问题描述】:
什么命令可以根据终端宽度证明文本的合理性?例如:
text is here text is here text is here text is here text is
here text is here text is here text is here text is here text
is here text is here text is here text is here
我想打印:
text is here text is here text is here text is here text is
here text is here text is here text is here text is here text
is here text is here text is here text is here
【问题讨论】:
-
您希望它右对齐到最长行的长度还是屏幕的宽度? (这两个答案在这一点上有所不同,我不清楚哪个是正确的)。
-
@CharlesDuffy:从预期输出的外观来看::从第一列开始的第二行告诉我,最长的行被用作对齐边距。
-
@CharlesDuffy 到屏幕的宽度
-
嗯,你编辑了你的问题。无论如何,在这种情况下,您应该接受@thatotherguy 的回答
-
@anubhava 是的,很抱歉。我没有注意到我写了错误的输出。
标签: linux bash shell unix terminal