1、接收固定参数
#!/bin/bash
echo "name of this file is `basename $0` --as the same time called as $0"
echo "first param is : $1"
echo "second param is : $2"
运行结果:
空参执行
然后带两个参数执行
2023-10-27 13:20:52
#!/bin/bash
echo "name of this file is `basename $0` --as the same time called as $0"
echo "first param is : $1"
echo "second param is : $2"
运行结果:
空参执行
然后带两个参数执行