paragraph-space.sh

来自「Shall高级编程」· Shell 代码 · 共 22 行

SH
22
字号
#!/bin/bash# paragraph-space.sh# Inserts a blank line between paragraphs of a single-spaced text file.# Usage: $0 <FILENAMEMINLEN=45        # May need to change this value.#  Assume lines shorter than $MINLEN characters#+ terminate a paragraph.while read line  # For as many lines as the input file has...do  echo "$line"   # Output the line itself.  len=${#line}  if [ "$len" -lt "$MINLEN" ]    then echo    # Add a blank line after short line.  fi  doneexit 0

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?