小编cub*_*ilo的帖子

正确的文字对齐 - bash

我有一个问题.我的文本应该在指定的宽度右对齐.我已设法将输出切割到所需的大小,但我把所有东西放在右侧都有问题

这是我得到的:

#!/usr/local/bin/bash

length=$1
file=$2
echo $1

echo -e "length = $length \t  file = $file "
f=`fold -w$length $file > output`
while read line
do
        echo "line is $line"
done < "output"
Run Code Online (Sandbox Code Playgroud)

谢谢

bash shell alignment text-alignment fold

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

alignment ×1

bash ×1

fold ×1

shell ×1

text-alignment ×1