Created
June 16, 2015 06:49
-
-
Save yuuichi-fujioka/692d580dd32be2f8f633 to your computer and use it in GitHub Desktop.
bash step debugging. when DEBUG is in environment variable, this script runs with step debugging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -n "$DEBUG" ] | |
then | |
trap 'read -p "$0($LINENO) $BASH_COMMAND"' DEBUG | |
fi | |
echo hello | |
echo world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment