shell option

Bash xpg_echo option

In Bash, enables default interpretation of backslash escapes by echo. Do not rely on echo behavior across environments.

Formal Syntax & Structure

bash syntaxbash
shopt -s xpg_echo

Return Value

behavior

In Bash, enables default interpretation of backslash escapes by echo. Do not rely on echo behavior across environments.

Working Example

Example Snippetbash
shopt -s xpg_echoecho 'one\ntwo'
Bash Reference