cialis internet generique finasteride acheter lioresal viagra sur le net forum viagra rezeptfrei wien tilskud viagra cialis generico foro viagra prijs viagra generico vendita baclofen schweiz comprar viagra barato tadalafil preise viagra rezeptfrei deutschland levitra tabletas viagra livraison 48h
cialis barato levitra farmacia commander cialis en france cialis 5 mg quelle est le prix acheter sildénafil par mastercard cialis commander kamagra tilaus viagra en allemagne viagra belgie levitra preisvergleich viagra prix de vente viagra 100 mg prezzo viagra kaufen rezeptfrei cialis dove si compra viagras en ligne

How to Remove Trailing Space from source files

When it comes to source code, i am a perfectionist. I cant stand to see trailing whitespace, interchanged tabs/spaces, etc.

This Stackoverflow user asked How To Remove Trailing Whitespace Of All Files Recursively.

This reply helped me to work around the fact that \s and \t are not supported in the mac version of sed:

find dir -type f -print0 | xargs -0 sed -i .bak -E “s/[[:space:]]*$//”

So using [:space:] can actually work for both tabs and spaces.

However, I ended up not using ‘find’ for the files, and then passing the files to sed directly:

sed -i ” ‘s/[[:space:]]*$//g’ **/*.*

Comments are closed.