Last active
August 29, 2015 14:03
-
-
Save rkaneko/76ce150572eff89681e7 to your computer and use it in GitHub Desktop.
Basis of Shell script.
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 | |
cat <<_EOT_ | |
# executing script name. Naming starting point is directory which call this scrip. | |
$0: $0 | |
# parent directory of executing script. | |
`dirname $0`: `dirname $0` | |
# name of executing script. | |
${0##*/}: ${0##*/} | |
# name of executing script. | |
`basename $0`: `basename $0` | |
# the number of args you gave execution script. | |
\$#: $# | |
# all values of args you gave executing script. | |
\$*: $* | |
# flag if excuted just before command is succeed or not. | |
\$?: $? | |
_EOT_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment