Shell Debugging Prompt String

$PS4 defines the prompt string of your shell, which is printed during shell debugging. It’s printed when line tracing is enabled, e.g. by calling set -x.

Examples

1
2
3
4
# Print a command's line number before executing it
PS4='[${LINENO}]+ '
set -x
echo Hello
BashSupport Pro is a Bash IDE with support for $PS4 – try it now!
© 2020–2022 Joachim Ansorg
Imprint
Privacy Policy
Legal