I type the following command:
echo "Hello World"
and get output
when I create a function to do the same display, I did not get output
here is my function:
testscript()
{
echo "Hello World"
}
I type the following command:
echo "Hello World"
and get output
when I create a function to do the same display, I did not get output
here is my function:
testscript()
{
echo "Hello World"
}
Welcome!
You have defined the function.
Now run it:
testscript
Note that in shell you run a function without ( )
A function behaves like a command.