I have a shell script which conditionally calls a function.
For Example:-
if [ \"$choice\" = \"true\" ]
then
process_install
elif [ \"$choice\" =
#!/bin/bash
# functiontest.sh a sample to call the function in the shell script
choice="true"
function process_install
{
commands...
}
function process_exit
{
commands...
}
function main
{
if [[ "$choice" == "true" ]]; then
process_install
elif [[ "$choice" == "false" ]]; then
process_exit
fi
}
main "$@"
it will start from the main function