hello.sh

来自「Shall高级编程」· Shell 代码 · 共 25 行

SH
25
字号
#!/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# ./goodbyeHELLO_CALL=65GOODBYE_CALL=66if [ $0 = "./goodbye" ]then  echo "Good-bye!"  # Some other goodbye-type commands, as appropriate.  exit $GOODBYE_CALLfiecho "Hello!"# Some other hello-type commands, as appropriate.exit $HELLO_CALL

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?