I'm currently writing my sql results to a file and they have trailing spaces after each field. I want to get rid of these spaces and I'm using this code:
TVXTEMP=$(echo $TVXTEMP|sed -e 's/\ //g')
It doesn't work though. I'm not familiar with sedscript, and the other codes I've found online also does not work..
Thank you for your replies! I was able to do workaround on my sql. Instead of fixing the file, I took out the spaces on my sql results and it worked perfectly.