How to remove blank lines from text files or js files
Dec 11, 2023
By running this command…
egrep --include=*.js -lRZ "^$" ./ | xargs -0 -l sed -i -e '/^$/d'
Just two parts to it, search for all *.js files and use sed
to replace new lines with nothing.
That’s all.