Created
February 22, 2017 06:24
-
-
Save handakumbura/3676452b1e2d178b91ddd8e490bbbe5d to your computer and use it in GitHub Desktop.
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 | |
#A convenient way to check if bash scripts contain syntax errors using the bash -n command. | |
INTERVAL=10 | |
while [ 1 -gt 0 ]; do | |
bash -n "$1" | |
if [ $? == 0 ]; then | |
echo 'No Syntax errors were found. Keep marching on soldier!' | |
fi | |
sleep $INTERVAL; #check interval | |
clear | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment