How to call a function in shell Scripting?

后端 未结 7 991
情话喂你
情话喂你 2020-12-05 05:06

I have a shell script which conditionally calls a function.

For Example:-

if [ \"$choice\" = \"true\" ]
then 
  process_install
elif [ \"$choice\" =          


        
相关标签:
7条回答
  • 2020-12-05 06:02
    #!/bin/bash
    
    process_install()
    {
        commands... 
        commands... 
    }
    
    process_exit()
    {
        commands... 
        commands... 
    }
    
    
    if [ "$choice" = "true" ] then
        process_install
    else
        process_exit
    fi
    
    0 讨论(0)
提交回复
热议问题