bash function within a function
How to make a function call within a function in Bash.
In my previous post, I used several functions. We will call them in the main function below.
main() {
checkLogin
displayHeader
getDisks
getSnaps
read -p "Do you want to proceed with restore? Are you sure? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
stopServer
detachDisks
deleteDisks
createDisks
attachDisks
setAutodelete
startServer
fi
}
main