The "source" command works very much like the "source" command ("." operator) in Bash. It takes an external file (or URL) and reads the content in line-by-line, executing each line.

So for example, if you have a file named "test.gsh" with contents of:

<snip>
echo "hello"
set a=1
echo "A is now: ${a}"
echo "goodbye"
</snip>

Then you could "source" that file, like:

<snip>
[EMAIL PROTECTED]:/> source ./test.gsh
hello
A is now: 1
goodbye
</snip>

--jason


On Jun 12, 2008, at 9:30 PM, Hernan Cunico wrote:

Howdy all,
I was wondering what is the "source" command option for in GShell. The command help does not tell much

Available commands:
source                Load a file/url into the current shell
--

VAL            Source file
-h (--help)    Display this help message

Reply via email to