简体   繁体   中英

How to pass one of that parameters as argument to this shell script

我有一个接受 2 个参数的函数,我正在尝试调用一个 shell 脚本,我需要将其中一个参数作为参数传递给这个 shell 脚本,我该怎么做

You just include them after the calling of the script:

sh shellscript.sh arg1 arg2

Then you would reference them in your shell script as $1 and $2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM