geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <ja...@planet57.com>
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:

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

Then you could "source" that file, like:

<snip>
jason@Bliss.local:/> 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


Mime
View raw message