File1:
hello world
How would one delete the leading/trailing blank spaces within this file using sed - using one command (n
You almost got it:
sed -e 's/^[ \t]*//;s/[ \t]*$//' a > c
Moreover on some flavours of sed, there is also an option for editing inline:
sed
sed -i -e 's/^[ \t]*//;s/[ \t]*$//' a