You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Hernan Cunico <hc...@gmail.com> on 2008/06/12 16:30:54 UTC
GShell - source
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
Re: GShell - source
Posted by Jason Dillon <ja...@planet57.com>.
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