問題が 1 つあります。私のテキストは、指定された幅で右揃えにする必要があります。出力を目的のサイズにカットすることはできましたが、すべてを右側に配置するのに問題があります
これが私が得たものです:
#!/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"
ありがとう