[Qbs] How to use ">" as argument to cat in the Command item

Christian Kandeler christian.kandeler at qt.io
Tue Feb 6 11:12:58 CET 2018


On Tue, 6 Feb 2018 11:01:48 +0100
Ola Røer Thorsen <ola at silentwings.no> wrote:

> I'm writing a Rule where one of the commands is using cat like this:
> 
> cat file1 file2 file3 > finalfile
> 
> My qbs code does this:
> 
> var cmd = new Command("cat", ["file1","file2","file3",">","finalfile"]);
> 
> The command line being used wraps > like '>', which doesn't work:
> 
> cat file1 file2 file3 '>' finalfile
> 
> Is this a qbs bug? Any way to work around this?

var cmd = new Command("cat", ["file1","file2","file3"]);
cmd.stdoutFilePath = "finalfile";
See http://doc-snapshots.qt.io/qbs/commands.html for all possible command properties.


Christian



More information about the Qbs mailing list