Skip to content

Instantly share code, notes, and snippets.

@AaronFlower
Last active November 9, 2017 05:17
Show Gist options
  • Save AaronFlower/7f72ef5da58eb15ceb2c17ac86f42ddf to your computer and use it in GitHub Desktop.
Save AaronFlower/7f72ef5da58eb15ceb2c17ac86f42ddf to your computer and use it in GitHub Desktop.
bash shell if statement
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