gcc build breaks when . in PATH

Javier Viguera javier.viguera@digi.com
Wed Jul 14 14:20:00 GMT 2010


On 07/14/2010 03:29 PM, Marc Kleine-Budde wrote:
> But not if the user pushes it :(
>
> echo .:/foo:.:/bar:.:.:/baz:. |
> 	sed -e "s/:\.:/:/g" -e "s/:\.$//" -e "s/^\.://"
>
> /foo:/bar:.:/baz


Something like this should do the trick:

sed -e "s/\(:\.\)\+:/:/g" -e "s/:\.$//" -e "s/^\.://"

> $ echo .:/foo:.:/bar:.:.:.:/baz:. | sed -e "s/\(:\.\)\+:/:/g" -e "s/:\.$//" -e "s/^\.://"
> /foo:/bar:/baz


-- 
Regards,

Javier Viguera


--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list