修改 bash 脚本本身的命令行参数

Modify command line arguments in bash script itself

我可以在 bash 脚本本身中更改命令行参数(如 $1、$2)吗?
我试过这样的东西:

='a'  
read var
=$var

内置设置可让您执行此操作。

来自the spec

The remaining arguments shall be assigned in order to the positional parameters.

来自the bash manual

The remaining N arguments are positional parameters and are assigned, in order, to , , … $N.