how to call a function in shell script

file name hello.sh


#user defined function
function hello()
{
echo "hello world"
}
hello


output:
run the command
$ bash hwllo.sh
hello world


Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post