Hacker News new | ask | show | jobs
by samgd 3588 days ago
sed 's/\s*$//g'
1 comments

Funnily, that doesn't work as expected on OS X due to a rather old version of sed installed by default that doesn't support \s. Try the following instead:

  sed 's/[[:blank:]]*$//g'