/dev/stderr

From wikieduonline
Revision as of 10:21, 16 November 2022 by Welcome (talk | contribs)
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

See also

Advertising: