how can i call a shell script method in other program
saikrishna cinux
Ranch Hand
Joined: Apr 16, 2005
Posts: 689
posted
0
Here is a problem in calling the methods being inside in another shell script program
can any one please tell me how to call a method which is there in another shell script is there any command to import that shell script file in my current program?
The reason why i am doing this thing is i am writing more frequenty used methods in one palce (utility.sh) file
so here i want to call the methods when ever i require to use it in other program
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
No Mr Stefan.. I have not intended to callt the script file instead my question was like this There is utility file in which there are multiple methods which take parameters when passed
so now in my program i want to call one particular method in utility script file by passing some parameters
So how cna i call a particular methods of other scipt file ? any command ?
No Mr Stefan.. I have not intended to callt the script file instead my question was like this There is utility file in which there are multiple methods which take parameters when passed
so now in my program i want to call one particular method in utility script file by passing some parameters
So how cna i call a particular methods of other scipt file ? any command ?
thanks for helping me
Stefan is my first name, just call me Stefan.
When you source a file which contains just functions, not code calling these functions, they are available for execution by your script.
utils.sh:
useutils.sh sources utils.sh and calls the functions: