1.读取参数:位置参数变量是标准的数字: $0是程序名, $1是第一个参数, $2是第二个参数... #!/bin/bash # using one command line parameter factorial= ; number <= $; number++ )) do factorial=$[ $factorial * $number ] done is $factorial 执行: # ./test1. The factorial of is 2.输入多个命令行选项,则在命令行上每个参…