功能:读取输入,打印;如果长度小于MINLEN,那么输出空格。
#!/bin/bash
# paragraph-space.sh
# Insert a blank line between paragraphs of a single-spaced text file.
# Usage: $ <FILENAME MINLEN=
while read line
do
echo "$line" len=${#line}
if [ "$len" -lt "$MINLEN" ]
then echo
fi
done exit
读入输入行,输出,如果长度${#line}小于(lt)最小长度那么输出空格