Last active
August 29, 2015 14:25
-
-
Save thegitfather/babd5d6d195032d1e318 to your computer and use it in GitHub Desktop.
bash test examples
This file contains 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 | |
# test if some command exists - like 'curl' | |
command -v curl >/dev/null 2>&1 || { echo "please make sure curl is properly installed. aborting..." >&2; exit 1; } | |
echo "ok all fine. proceeding..." | |
exit 0 | |
# test if file exits | |
if [ -f "$HOME/.bash/bash_aliases.sh" ]; then | |
source "$HOME/.bash/bash_aliases.sh" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment