How to get the nth positional argument in bash?

后端 未结 4 1465
傲寒
傲寒 2020-12-07 13:03

How to get the nth positional argument in Bash, where n is variable?

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 13:38

    Read

    Handling positional parameters

    and

    Parameter expansion

    $0: the first positional parameter

    $1 ... $9: the argument list elements from 1 to 9

提交回复
热议问题