Last active
November 9, 2017 05:17
-
-
Save AaronFlower/7f72ef5da58eb15ceb2c17ac86f42ddf to your computer and use it in GitHub Desktop.
bash shell if statement
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
if [ -f .bashrc ] ; then | |
echo "bashrc exists" | |
else | |
echo "bashrc does not exist" | |
fi | |
if [[ -r .bashrc ]] | |
then | |
echo ".bashrc exists and have permission granted." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment