Sed: reduce multiple spaces to single space

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. 😀