Last active
January 21, 2016 15:07
-
-
Save andrealbinop/d23fb88de651b4cd33d9 to your computer and use it in GitHub Desktop.
File with usefull shell commands
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 | |
# fail on first error | |
set -e | |
# cd to the dir containing the script | |
cd $(readlink -f $(dirname $0)) | |
# if file exists... | |
if [ -f $file ];then | |
echo "file exists: $file" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment