Boost logo

Boost-Build :

Subject: Re: [Boost-build] string manipulation
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2016-10-13 16:24:36

On 13.10.2016 16:11, aaron_at_[hidden] wrote:
> Have a look at the docs here:
> > Specifically, I have a variable that captures the output of an external
> > tool I have executed. How can I strip off the trailing newline from that
> > when I assign that to another variable ?
> The SHELL rule has an optional parameter that will automatically strip
> off the trailing newline
> (this is not documented).
> Use it like this:
> local output = [ SHELL path/to/ : strip-eol ] ;
> And the newline will automatically be stripped.

Thanks, that works. How can I capture errors using the SHELL command,
i.e. handle cases where `path/to/`either returns an error or
writes to stderr (or both) ?


      ...ich hab' noch einen Koffer in Berlin...

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at