Wednesday, March 13, 2013

Remove leading and tailing spaces of each line

cat input.txt | sed 's/^[ \t]*//;s/[ \t]*$//' > output.txt

No comments:

Post a Comment