mirror of https://github.com/tLDP/LDP
*** empty log message ***
This commit is contained in:
parent
3f8a989688
commit
8b270724da
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
# hello.sh: Saying "hello" or "goodbye"
|
||||
#+ depending on how script is invoked.
|
||||
|
||||
# Make a link in current working directory ($PWD) to this script:
|
||||
# ln -s hello.sh goodbye
|
||||
# Now, try invoking this script both ways:
|
||||
# ./hello.sh
|
||||
# ./goodbye
|
||||
|
||||
|
||||
HELLO_CALL=65
|
||||
GOODBYE_CALL=66
|
||||
|
||||
if [ $0 = "./goodbye" ]
|
||||
then
|
||||
echo "Good-bye!"
|
||||
# Some other goodbye-type commands, as appropriate.
|
||||
exit $GOODBYE_CALL
|
||||
fi
|
||||
|
||||
echo "Hello!"
|
||||
# Some other hello-type commands, as appropriate.
|
||||
exit $HELLO_CALL
|
Loading…
Reference in New Issue