-
-
Save sylr/348054 to your computer and use it in GitHub Desktop.
perl command lines
This file contains 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
# trim lines containing only spaces or tabs | |
perl -pi -e "s/^(\s+|\t+)$/\n/i" * | |
# remove duplicate empty lines | |
perl -i -0777 -pe "s/^([^\n]+)\n+$/\$1\n/mg" * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment