Global Variable in a script?

How to create a Global variable within a script file.

say i want a varaible called LOGFILE to be used within all the script.

how to do that?

Skyineyes,
If you want to reference a variable in the same shell script,
there is nothing special you need to do, just assign the value
and use it.

If you want to use the variable across shell scripts:

export myvar="Test"

if we want to access the variable across the shell also the entire UNIX server, you can create a variable in ENV file. but you should use the "export" keyword prefix of the variable.

eg:

export VAR_NAME;

Then you can access the variable name VAR_NAME in across the shell and acros the unix server for you username login.

Thanks,
Siva.P
Bangalore