【发布时间】:2022-01-26 08:29:36
【问题描述】:
我正在学习 bash my self ????我被困在我的问题上,请帮忙!
我见过许多带有标志的 bash 脚本,这些标志可以在不运行整个脚本的情况下执行,例如如果使用 proot-distro 然后我们输入 proot-distro login distroname 或 proot-distro --help 等。
我怎样才能做到这一点?
【问题讨论】:
-
你需要接受并解析命令行参数。
-
你的问题太笼统了,这里已经回答了:How do I parse command line arguments in Bash?
标签: linux bash powershell shell script