Created
February 9, 2012 23:01
-
-
Save tapajos/1784083 to your computer and use it in GitHub Desktop.
Remove whitespaces e linhas em branco duplicadas
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
| #!/usr/bin/env bash | |
| for fname in $(find . -name "*.rb" -print) | |
| do | |
| cat -s ${fname} | sed 's/[\t ]+$//g' > ${fname}.new && | |
| mv ${fname}.new ${fname} | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@!#$@$@ ... detalhes que a gente não vê quando está com pressa. Agora ficou bonito, thanks. :-)
Nota mental: "não esquecer a linha em branco nos blocos do Gist ... e o menino sabe demais!" (essa última só quem é fã de Simpsons vai entender ;-)