Sed: reduce multiple spaces to single space
Mar 18
Top of my head regexp, sed No Comments
sed ’s/[ t]+/ /g’ input-file
or
echo “Some random text. 🙂 ” | sed ’s/[ t]+/ /g’
You have no idea how often I forget this useful snippet. 😀
Thoughts from my head, published to the web. Punishment for people like you who have nothing better to do.
Mar 18
Top of my head regexp, sed No Comments
sed ’s/[ t]+/ /g’ input-file
or
echo “Some random text. 🙂 ” | sed ’s/[ t]+/ /g’
You have no idea how often I forget this useful snippet. 😀