Note the method to get the return value from function in shell script (bash)
#!/bin/bash
#function
func()
{
num=100
echo ${num}
}
# main
res=$(func) # Execute the function -- func and then get the return value
沒有留言:
張貼留言