Created
September 12, 2018 01:05
-
-
Save naganowl/02a0c52d878c31c46baa812e861e4ad5 to your computer and use it in GitHub Desktop.
Replace blank lines with just a single one
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inspired by https://unix.stackexchange.com/questions/72739/how-to-remove-multiple-blank-lines-from-a-file | |
for i in `grep -rl classSelector app/assets/stylesheets/` ; do cat $i | awk '!NF {if (++n <= 1) print; next}; {n=0;print}' | tee $i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment