-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to lacsap on 7/30/2007 6:11 AM: > i have 2 scripts : example : toto.sh (main script) and toto.conf.sh > > toto.conf.sh : > ... > exit 0
If you want toto.conf.sh to be sourced as part of a larger script, you should either use return or just let the exit status implicitly be that of the last executed command, rather than calling exit on success (otherwise, you would be exiting the larger script as well). > > toto.sh : > > domain="" > site_name=$1 > ./toto.conf.sh $site_name As written, you are invoking toto.conf.sh independently, in its own shell environment. If you want toto.conf.sh to affect the current environment, you need to source it - look at the documentation for '.' (also known as 'source'). - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGrd9W84KuGfSFAYARAskyAKCEapIDMUHV/XwAAZXdC+8BWAVMdwCfZHi9 kU2wLSrH8Oc2zIPftORLMjY= =FtHn -----END PGP SIGNATURE----- _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash