Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 484 Bytes

debug.md

File metadata and controls

18 lines (14 loc) · 484 Bytes

bash debug via adding trace info with traps

trap 'echo "line ${LINENO}: ANSWER: $ANSWER"' DEBUG
trap 'echo "$BASH_COMMAND" failed with error code $?' ERR

bash debug via special execution flags

# set -o xtrace
bash -x /opt/mapr/installer/docker/mapr-setup.sh

bash -u /opt/mapr/installer/docker/mapr-setup.sh

see also

how to catch/send signals from/to process