#!/bin/bash
#存储为a.sh
if [ $1 == 100 ] then return 0 #参数正确,返回0 else return 1 #参数错误,返回1 fi

#!/bin/bash
#存储为b.sh
echo $?
$ . ./a.sh 100
$ . ./b.sh
0

 

相关文章:

  • 2023-03-23
  • 2021-10-18
  • 2021-06-21
猜你喜欢
  • 2021-07-10
  • 2021-07-02
  • 2021-06-26
  • 2021-11-12
相关资源
相似解决方案