![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| calling function inside awk | jisha | Shell Programming and Scripting | 2 | 04-14-2008 07:44 AM |
| Calling a function | ashika | UNIX for Dummies Questions & Answers | 5 | 09-12-2006 07:58 PM |
| calling c++ function from script | Lebamb | High Level Programming | 3 | 06-24-2003 09:53 AM |
| c++ calling main() function | norsk hedensk | High Level Programming | 3 | 01-22-2003 08:28 PM |
| calling a c function from shell | seshagiri | UNIX for Dummies Questions & Answers | 4 | 12-06-2000 09:51 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Calling other file function
Hi,
I am pretty new to unix. Lets say i have a program(run_program) that will call another file function(functiona, in same directory): hence, inside that run_program. i will just call "functiona xx xx" to refer and use that function. this run ok until i run this program from another folder. it always say it cannot find the functiona? Why this happened? |
|
|||||
|
By default "." i.e current directory is in your path and you are able to access the functiona when it lies in same directory.
To make sure the function a is always call irrespective of location introduce a line in your shell script . $YOU_PATH/functiona Here onwards your call to functiona will always be successful irrespective of your present location. Regards, Rishi |
|
||||
|
thanks for both of ur reply.
i solve the problem by cd to the working directory in my schedule job. the reason why i never consider to use full path is because it will restrict my program flexibility or rather i need to change the path each time i need to use it in other place as well. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|