Created
April 22, 2014 09:44
-
-
Save mhenrixon/11172234 to your computer and use it in GitHub Desktop.
Recursively adds newline to the end of every file with the .rb extension
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
for file in **/*.rb; do | |
[ -e "$file" ] || continue | |
if [[ -n "$(tail -c 1 <"$file")" ]]; then | |
echo >> "$file" | |
fi; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment