achat levitra france 
viagra generique viagra quebec 
sildenafil citrate mg 
viagra pour homme 
viagra pas cher en pharmacie 
achat cialis générique 5mg 
achat cialis livraison express 
cialis 5 prix 
expert clinique cialis 
kamagra sans ordonnance 
cialispas cher 
viagras pour homme 
cialis toulouse 
cialis achat comparatif 
vente cialis en france 
vente viagra belgique acheter cialis 20mg viagra køb uden recept viagra per le donne achetez viagra en france viagra bfrancais apotheke cialis trail pack viagra vente kamagra billig cialis viagra pris cialis per le donne achat cialis générique en france pharmacie viagra comprar viagra generico

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.