more bash! regex substitution to crop trailing whitespaces

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Tue Dec 18 20:40:13 UTC 2007


E K wrote:
> Can you try 
> 
> VAL1=`echo $VAL`   # ` is the back quote
> 
> and use $VAL1 in what you will be using $VAL. If the trailing spaces
> are recognized as such by the shell, the above assignment should
> remove them.
> 
> Hope that helps,
> EK

This does indeed work. It's not a "proper" regex, but at this point... :P

Thanks!

Madi
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list