[plug] calling a script within a script

Ashley Jennings fooscope at gmail.com
Fri Dec 9 11:20:07 WST 2005


Hi Jon,

I've hacked two scripts to see if I understood "exec" correctly.

here is a demo which works for two files in the same directory.

<file foo>
#!/bin/sh

exec ./foo2



<file foo2>
#!/bin/sh

echo "Hello from foo2"



all the best

Ashley
http://gumnut.sf.net


On 09/12/05, Jon  Miller <jlmiller at mmtnetworks.com.au> 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
> ./backup1-functions
> . ./backup1-functions
> 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
>
> Thanks
>
>
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://www.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au
>



More information about the plug mailing list