[plug] calling a script within a script

Jon Miller jlmiller at mmtnetworks.com.au
Thu Dec 8 21:56:26 WST 2005


Both the script and the function library are in the same directory. 
I even added the directory to /etc/ld.so.conf and ran ldconfig, still produce the same response as before.

Jon

>>> jonathan at pcphix.com 8:31:18 pm 8/12/2005 >>>
Jon Miller wrote:

>Like to know how do I call a script (backup1-functions) within a script (backup1.sh).  Within the backup1-functions script there are other functions.  
>
>Tried the following
>. backup1-functions
>  
>
used for setting variables

>./backup1-functions
>  
>
means the script is in the current directory (this might not be the case)

>. ./backup1-functions
>  
>
a combination of both

>I get the same response:
># ./backup1.sh
>./backup1.sh: line 21: ./backup1-functions: No such file or directory
>./backup1.sh: line 24: tar_backup: command not found
>./backup1.sh: line 27: tar_verify: command not found
>
>  
>
Sounds like the script is not located where you think it is - i.e. the 
same directory as you are running "backup1.sh" from...

Just a stab in the dark anyway.  It sounds like I'm stating the obvious, 
so if there is nothing new in my answer, I'll leave it to the rest of 
PLUG to tackle.

I'm still fairly new to bash scripting and must admit, I haven't tried a 
script from within a script yet...

-- 
Jonathan Young
Director of PC-PHIX
jonathan at pcphix.com 

Phone: 0410 455 674
Web: http://www.pcphix.com/ 





More information about the plug mailing list