stderr
Jump to navigation
Jump to search
2>&1
&>
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]
stdin
,stdout
,stderr
,/dev/null
, File descriptor- Linux logging, Cisco IOS logging
- Shell:
sh
,Bash
,ksh
,zsh
,ash
, PowerShell (Windows),/usr/bin/env
, Fish shell,.hushlogin
,dash
,tcsh
, Shell redirection,dquote, $SHELL
, Google Cloud Shell, AWS CloudShell, explainshell.com
Advertising: