stderr

From wikieduonline
Jump to navigation Jump to search

wikipedia:stderr


your-command-with-stdout-and-stderr 2>&1 | tee -a your file



err() {
  echo "[$(date +'%Y-%m-%dT%H:%M:%S%z')]: $*" >&2
}

if ! do_something; then
  err "Unable to do_something"
  exit 1
fi


Related[edit]

See also[edit]

Advertising: