Skip to main content

Timeline for Separate stdout of an application

Current License: CC BY-SA 4.0

14 events
when toggle format what by license comment
Oct 6, 2024 at 15:24 answer added Stéphane Chazelas timeline score: 0
Jun 21, 2019 at 14:30 comment added Florian Bach I was using the -o option. And the resulting file (with cat > test behind the pipe) was empty, and I did test it. However I found out that this was because I called nsntrace with sudo and apparently that's not enough. Did a sudo su first and then it worked. Thanks.
Jun 21, 2019 at 14:25 comment added user147505 @mosvy 3>&1 1>/dev/null 2>&1 makes it even cleaner.
Jun 21, 2019 at 14:24 comment added user313992 Yes, it works. Provided, of course, that you're using the -o, not the -f option: src/nsntrace -o /dev/fd/3 wget www.google.com 3>&1 >/dev/null | .... I supposed you assumed that it cannot work. This is really annoying.
Jun 21, 2019 at 14:08 comment added Florian Bach Sorry for the confusion. I did use -o, and I did try your command @mosvy and it didn't work.
Jun 21, 2019 at 14:08 history edited Florian Bach CC BY-SA 4.0
edited body
Jun 21, 2019 at 14:07 comment added user147505 In the link you put in your update -f stands for filter while -o is the output.
Jun 21, 2019 at 14:04 comment added user313992 Have you tried it?
Jun 21, 2019 at 14:04 history edited Florian Bach CC BY-SA 4.0
added 115 characters in body
Jun 21, 2019 at 14:03 comment added Florian Bach Unfortunately, that also silences the binary data the program is supposed to output (to fd 3).
Jun 21, 2019 at 14:01 comment added user313992 I'm not sure I understand what you're about but try program -f /dev/fd/3 3>&1 >/dev/null | ...
Jun 21, 2019 at 14:01 comment added Florian Bach I did check that, and no, there is no option to silence the program. I need to do that externally (or modify the source and recompile it, which I don't really like doing).
Jun 21, 2019 at 13:54 comment added user147505 If the program makes use of -f - there should also be something like -q for "quiet", given it's not done by default. Have you checked that?
Jun 21, 2019 at 13:46 history asked Florian Bach CC BY-SA 4.0