exec
Replace the shell with the given command.[1]
Documentation
- exec [EN] @ GNU Bash Reference Manual
- bash -c 'help exec'
- man 1 'bash' [EN]
Syntax
exec [PARAMETER ...] [COMMAND [PARAMETER ...]] [REDIRECTION ...]
Examples
NOTE:
This is very helpful when using online compilers like Ideone.com.
exec 2>&1
exec >>"${logs}/my_app.log" 2>&1
date '+%n----- %F %T -----'
References
- ↑ bash -c 'help exec'