Home » Questions » Computers [ Ask a new question ]

Set environment variables from within a bash shell

Set environment variables from within a bash shell

Is there a way to set environment variables from within a (bash) shell script?

Asked by: Guest | Views: 205
Total answers/comments: 1
Guest [Entry]

"file export_FOOBAR:

# set variable FOOBAR to ""hi""
FOOBAR=hi
export FOOBAR

at the prompt

yourhost:/~ > source export_FOOBAR"