比如用echo向文件中输入两行两列文字,则如果第一列的文字不一样长,那么第二列以后的文字就不能保持对齐,如下所示:
123456 test
123 test
不知在dos7.1下有没有办法对echo输出到文件的内容进行对齐?
123456 test
123 test
不知在dos7.1下有没有办法对echo输出到文件的内容进行对齐?
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
4DOS Help Topic: @FORMAT
@FORMATx],string]: Reformats a string, truncating it or padding
it with spaces as necessary. If you use the minus , the string is
left-justified; otherwise, it is right-justified. The x value is the
minimum number of characters in the result. The y value is the maximum
number of characters in the result. You can combine the options as
necessary. For example:
"%@format" returns " JPSoftware"
"%@format" returns "JPS"
@FORMAT will add leading or trailing spaces if necessary to pad the result
to the minimum width specified by x. If a leading zero is used before x,
the padding will be with 0's instead, for example:
"%@format" returns " 5"
"%@format" returns "0005"
"%@format" returns "5000"
See also the @COMMA function, which can make numeric values easier to read
by inserting thousands separators.