Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • Clarified that mycommand has own direct logging. I need to figure out else (stdout? stderr?). This speaks all output, which it awful. Commented Apr 21 at 14:44
  • 1
    @TimSO hence the questions about how the log file is populated and whether the ERROR message is going to stderr or stdout; having said that ... I've got 2 versions of my mycommand (one writes ERROR: to stderr; one writes everything to stdout) and espeak is only processing the ERROR: line; the only way this approach speaks every line is if ALL mycommand output is being sent to stderr Commented Apr 21 at 14:52
  • 1
    run ./mycommand 1>mycommand.stdout 2>mycommand.stderr, then see what's dumped to the *.stdout and *.stderr files Commented Apr 21 at 15:01
  • 1
    zsh has its own internal tee, you can just do cmd >&2 2>&1 | grep... | espeak... to redirect both stdout and stderr to both the original stderr and a pipe to grep Commented Apr 21 at 16:37
  • 1
    Thanks a lot, works, accepted. Sorry I did not know in the beginning, now checked ERROR is really in STDERR. Also @StéphaneChazelas solution works. Commented Apr 22 at 7:15