This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc build breaks when . in PATH


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]