On 2020/11/25 23:56, Alexander Hall wrote: > > > On November 25, 2020 11:09:02 PM GMT+01:00, Stuart Henderson > <s...@spacehopper.org> wrote: > >On 2020-11-25, Manuel Giraud <man...@ledu-giraud.fr> wrote: > >> I have one (somewhat) related question left: is possible to capture > >the > >> output of pkg_delete -an in a file? I tried the following (without > >> luck): > >> $ pkg_delete -an > /tmp/foo > > > >Here you redirect stdout from the process to /tmp/foo > > > >> $ pkg_delete -an > /tmp/foo 2>&1 > > > >And here you redirect stdout from the process to /tmp/foo, and then > >stderr to stdout. > > > >What you need is: > > > > $ pkg_delete -an 2>&1 > /tmp/foo > > > >- redirect stderr to stdout, then redirect stdout (which now includes > >stderr) to /tmp/foo. > > I think you're wrong. I hope I'm not.
Ah yes, you are right, I had it exactly the wrong way round. > Is it rather possibly so that pkg_delete handles output to a TTY different > than to a non-TTY? yep.