stdmux - Multiplex the given command's STDOUT and STDERR by prefixing lines



NAME

stdmux - Multiplex the given command's STDOUT and STDERR by prefixing lines


SYNOPSIS

stdmux [-o STDOUT_PREFIX | -e STDERR_PREFIX] [--] COMMAND [ARGS]


OPTIONS

-o
-e
-u, --unbuffered

TODO


EXIT STATUS

stdmux(1) exits with the COMMAND's exit status.


USAGE EXAMPLE

  mux_output=`stdmux command`
  demux() { local prefix=$1; sed -ne "s/^$prefix//p"; }
  output_text=`echo "$mux_output" | demux 1`
  error_text=`echo "$mux_output" | demux 2`
 stdmux - Multiplex the given command's STDOUT and STDERR by prefixing lines