Boost logo

Boost-Build :

Subject: [Boost-build] Unexpected line feed when capturing shell output
From: Martin Dyring-Andersen (mda_at_[hidden])
Date: 2015-09-19 17:21:29

Hi guys,

I am trying to capture output of a shell command in local variable to be used in a <define> later on. However I am running into some trouble, specifically that a line feed is also captured:

local MY_LOCAL = [ SHELL "echo test" ] ;
echo "before$(MY_LOCAL)after" ;

It yields this output:


Where I was hoping for:


Is it expected that a line feed is captured in the local variable? Have tried with piping into "head -1" etc.

Any helpful pointers appreciated.

Best regards,
Martin Dyring-Andersen

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