Boost logo

Boost-Build :

Subject: Re: [Boost-build] Capture external program output using a Boost.J am variable
From: Daniel Lidström (daniel.lidstrom_at_[hidden])
Date: 2008-12-02 03:34:11


Vladimir Prus wrote:
> I'm afraid you get to strip newline. E.g.:
>
> ECHO "X:" ;
> local x = [ SHELL "date +%s" ] ;
> ECHO $(x) ;
> ECHO "Y:" ;
> local y = [ MATCH "(.*)[\n]" : $(x) ] ;
> ECHO $(y) ;
> ECHO "end" ;
[...]
> Let me know if this helps. Maybe, we should modify 'SHELL' to
> (optionally)
> strip the last trailing whitspace?

I tried this with 3.1.17, and it seems to work perfectly!
Many thanks!

-- 
Daniel Lidström

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk