将标志传递给 bash 脚本

Passing flags to bash script

我有以下脚本来调用 node.js 脚本:

declare -a years=(
  '2011'
  '2012'
  '2013'
  '2014'
  '2015'
  '2016'
)

  for year in "${years[@]}"
  do
    gps --type=CNPJ --format=XLS --identification=??? --password=???? --competence=${year} --output="THE Identification - $year"
  done

我希望它调用:

bash gps.sh --identification=1234567890 --password=123456

可能吗?目前我每次都需要更改文件并调用它,并且作为标志传递会让我更快地完成。

谢谢。

替换

--identification=??? --password=????

来自

"" ""