Hi,
I have create a shell script with a function.
Code:
#!/bin/bash
echo "Test shell script"
function checkfunction()
{
echo "hey! shell script function called"
}
checkfunction
when i execute the above program in local/terminal. i got the output:
Test shell script
hey! shell script function called
NOTE:
When i invoke the above shell script from java using the code
Code:
Runtime.getRuntime().exec(filename.sh) ;
i got the output:
Test shell script
Here the problem is, the function in shell script is not invoked.
whether i have to export the functions?
Please Suggest me, how to solve this problem.
Regards,
Nanthagopal A