Contents / Previous / Next


Return Parameters

With the "." command a script can be
executed in the current shell.
Hence all changes to variables are kept. Example: . .profile But you cannot give arguments to a
script called with the "." dot.

Three Tricks:

1) Save return values in a file.

2) Use the exit status.

3) Use back-quotes: call in the child script (My_child.sh): echo ${RESULT} and in the parent do: CHILD_RESULT = `My_child.sh`