读取多个命令行参数.sh Shell 脚本

Shell 片段 · codes/shell/输入和输出/读取多个命令行参数.sh · 9 行

源码

#!/usr/bin/env bash

# handing lots of parameters

total=$[ ${10} * ${11} ]
echo The tenth parameter is ${10}
echo The eleventh parameter is ${11}
echo The total is $total

查看上游源码 ↗

内容与示例整理自 dunwu/linux-tutorial,遵循 CC BY-SA 4.0;本站保留原作者署名与许可,命令仅供学习,执行前请核对目标环境。