geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <>
Subject Re: GShell - source
Date Thu, 12 Jun 2008 16:40:09 GMT
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:

echo "hello"
set a=1
echo "A is now: ${a}"
echo "goodbye"

Then you could "source" that file, like:

jason@Bliss.local:/> source ./test.gsh
A is now: 1


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

View raw message