Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Normalize trailing newlines
find . -type f \( -name "*.htm*" -or -name "*.js*" -or -name "*.css" -or -name "*.*ml" -or -name "*.tpl" -or -name "*.md" -or -name "*.txt" \) -exec sh -c 'echo -e "\r\n" >> "$0" ' {} \; -exec sed --in-place -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.