perl -i.bak -0777pe 's/\n\n/\n/g' inputtext