Sunday, October 28, 2018

Trim leading and trailing whitespace using sed


sed -i 's/^[ \t]*//;s/[ \t]*$//' filename

No comments:

Post a Comment