Shell scripts — When the wrapper you are building is particularly complex, a much better solution is to use a shell script that you can call in place of the original command.
外壳脚本——当您要构建的包装特别复杂时,更好的解决方案是使用外壳脚本,您可以代替原始命令调用这些脚本。
There are a couple of ways around this — either write a wrapper script or specify the environments on the command line.
有两个解决方法——编写一个包装器脚本或在命令行上指定环境。
Listing 8 is a sample shell script that ACTS as a wrapper around either the adduser or useradd command.
清单8是用作adduser或useradd命令的包装的示例外壳脚本。
应用推荐