====== Remove Mutli-Blank lines ====== When we coding and can found there has some blank lines, so we need to remove them but just keep one blank line. So here has some solutions * cat -s * sed 'N;/^\n$/D;P;D;' * for i in *; do FILE=$(cat -s "$i"); echo "$FILE" > "$i"; done ===== Refer ===== * https://stackoverflow.com/questions/922449/how-can-i-replace-multiple-empty-lines-with-a-single-empty-line-in-bash * https://stackoverflow.com/questions/922449/how-can-i-replace-multiple-empty-lines-with-a-single-empty-line-in-bash/934451#934451