Bash scripting

Matthias B. msbREMOVE-THIS at
Sun Dec 26 06:34:13 PST 2004

On Tue, 21 Dec 2004 12:33:52 -0700 Ron Keller <rakeller at> wrote:

> I would like to set up a script, executed a s root, that will set up the
> LFS variable for me so I don't have to type export LFS=/mnt/lfs each 
> time I want to continue working through the LFS-6.0 book . The following
> is what I have tried so far and it doesn't work.  Can someone help me 
> please?.  Thank you
> rk
> #!/bin/bash
> export LFS=/mnt/lfs

Whenever you execute a shell script, a new shell is started to execute it
and any changes it makes to the environment are local to that new shell.
To execute a script in the current shell, use either

.  scriptname

(i.e. dot, space, scriptname)

source scriptname


I didn't know it was impossible when I did it.

More information about the lfs-support mailing list