相关疑难解决方法(0)

如何在shell Scripting中调用函数?

我有一个有条件地调用函数的shell脚本.

例如:-

if [ "$choice" = "true" ]
then 
  process_install
elif [ "$choice" = "false" ]
then 
  process_exit
fi

process_install()
{
  commands...
  commands...
}

process_exit()
{
  commands...
  commands...
}
Run Code Online (Sandbox Code Playgroud)

请让我知道如何做到这一点.

shell

21
推荐指数
3
解决办法
9万
查看次数

标签 统计

shell ×1