Hi all,
I've been looking for how to eliminate blank spaces in a variable or strings. I've seen several ways, using sed, awk and even python. One of them is use 'tr' command, but it does not work as I expected: For example:
echo " stuff " | tr -s " "
leaves one space ahead and another behind. Why?
I also tried
echo " stuff " | tr -d " "
and it works successfully. However, all samples I've seen with "tr", use -s option (which I guess it means replace) rather than -d option.
I'd like to know why.
Thanks a lot.
Albert.