redirection

Bash Descriptor duplication for output

The numeric form duplicates descriptor 2 onto stdout for the command. This is not a request to return status 2.

Formal Syntax & Structure

bash syntaxbash
command >&2

Return Value

behavior

The numeric form duplicates descriptor 2 onto stdout for the command. This is not a request to return status 2.

Working Example

Example Snippetbash
printf '%s\n' warning >&2
Bash Reference