Created
November 19, 2013 10:55
-
-
Save sheeeng/7543676 to your computer and use it in GitHub Desktop.
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
if [ $# -gt 0 ]; then | |
echo "Your command line contains $# arguments." | |
else | |
echo "Your command line contains no arguments." | |
fi | |
if [ "$1" != "" ]; then | |
echo "Positional parameter 1 contains something." | |
else | |
echo "Positional parameter 1 is empty." | |
fi | |
processDirectory="${1:-$PWD}" | |
echo "The ${processDirectory} directory will be processed." | |
cd ${processDirectory} | |
echo "\$PWD is" $PWD "directory." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment