lets say I have a program the echos a bunch of variables, say a
classpath...

I can't source the file in, I actually have to run it (becuase it might
be java or C), and it spits out something like:

"CLASSPATH=/blah/blah/blah.jar:/blah/blah/blah2.jar"  or whatever a java
classpath needs to look like.

But running that in a subshell doesn't set it in the current shell.

So I do:

eval `get_java_classpath.exe`

And it sets the CLASSPATH in the current instance of the shell.

Another one is the resize command which spits out variables about the
size of the shell.

eval `resize` adjusts the variables in the current shell.

--R

On Sat, 2008-10-18 at 14:49 -0400, Simón Ruiz wrote:
> Rob,
> 
> I don't get "eval". Was this mentioned on Thursday?
> 
> [EMAIL PROTECTED]:~$ x=5
> [EMAIL PROTECTED]:~$ echo $x
> 5
> [EMAIL PROTECTED]:~$ eval x=10
> [EMAIL PROTECTED]:~$ echo $x
> 10
> 
> What value does it add?
> 
> Simón
> 
> On Sat, Oct 18, 2008 at 2:15 PM, Rob Ludwick <[EMAIL PROTECTED]> wrote:
> > Here's my quick list of bash shell tricks.  I took the approach from
> > using them more or less in a shell script, but there is some more info
> > on setting up your bash shell prompt with a link to the color ascii
> > codes.
> >
> > Among the books the Vern suggested, I also highly recommend Linux in a
> > Nutshell from O'Reilly.
> >
> > --R
> >
> > _______________________________________________
> > Fwlug mailing list
> > [email protected]
> > http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org
> >
> >
> 
> _______________________________________________
> Fwlug mailing list
> [email protected]
> http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org



_______________________________________________
Fwlug mailing list
[email protected]
http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org

Reply via email to