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