xiu12 发表于 2018-8-28 08:54:26

shell脚本带参数实例

  #!/bin/bash
  name=$1
  old=$2
  if [[ $# -ne 2 ]];then
  echo "the test must input 2 nu!!"
  echo $#
  exit 0
  fi
  echo "my name is ${name}!"
  echo "i'm ${old} yeas old!"
  if [[ ${old}
页: [1]
查看完整版本: shell脚本带参数实例