$[timeformat('2018-03-30T09:57:40+08:00')]

shell参数传递

我们可以在脚本执行时,向脚本传递参数

// 终端运行 脚本,并传入参数
sh testBash.sh 0 1 2

echo "Shell 传递参数实例!"

echo "\$0 => $0"

echo "\$1 => $1"

打印结果:

Shell 传递参数实例!
$0 => testBash.sh
$1 => 0