Should `dub run` prints its output to STDERR?
    Ky-Anh Huynh via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Fri Sep  8 21:51:03 PDT 2017
    
    
  
When I execute a program thanks to dub, `dub` also prints its 
information to STDOUT:
[code]
$ dub run dusybox:jq -- .status "           1" < 
/home/pi/df/acces.log |head -10
Building package dusybox:jq in /home/pi/projects/icy/dusybox/
Performing "debug" build using dmd for x86_64.
dusybox:jq ~master: target for configuration "application" is up 
to date.
To force a rebuild of up-to-date targets, run again with --force.
Running ./dusybox_jq .status            1
403            1
403            1
302            1
[/code]
Those first 5 lines are generated by `dub` and written to STDOUT. 
This is a bit inconvenient if I want to use my program output as 
input for another program.
We may have the same program if `dub` writes to STDERR. But it's 
more sense that a pipe program uses STDIN for input. This is a 
popular behavior I think.
Is there any option other than redirecting which depends on shell 
support?
Thanks,
    
    
More information about the Digitalmars-d-learn
mailing list