16_4.sh

来自「该程序是一个计算成绩的源代码」· Shell 代码 · 共 33 行

SH
33
字号
#!/bin/shnum="$#"if [ $num != 2 ]   then      echo "Usage: $0 two integer-argument!"      exit 1fifirnum="$1"secnum="$2"if [ $firnum -lt $secnum ]   then      while [ $firnum -le $secnum ]         do           echo "$firnum "           firnum=`expr $firnum + 1`         done         exit 0   elif [ $firnum -gt $secnum ]      then         while [ $firnum -ge $secnum ]            do              echo "$firnum "              firnum=`expr $firnum - 1`            done            exit 0   else      echo "They are equl! Both are: $firnum"      exit 1fiecho

⌨️ 快捷键说明

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