카테고리 없음

세 줄 이상 빈 줄을 두 줄로 줄이기

een 2024. 9. 11. 17:46

# 세 줄 이상 빈 줄을 두 줄로 줄이기

sed -i -r ':a; /^\s*$/ {N;ba}; s/( *\n *){2,}/\n\n/' a.txt