environment variables

Hi,

If i have a variable set and exported in my pofile file will that variable be available in all shell scripts created.

Thanks,
Radhika.

In all shell scripts created? No.
Shell variables have significance only at runtime. If you run any of the scripts from your id, then the variable will be set. If you run it from any other id that does not set the variable, then the value will not be set.
Just because the variable value was set when the shell script was created does not mean that it will be set at runtime.

dear

when you define variable in profile and you want to export for all user
then your all user path set for a specific directory say in root </usr1>
and now you set profile in this with export variable now all user can take
variable which defined in /usr1 .profile.

pankajbraval
pankajbraval@sify.com

The proper way to make a scrpt is to make sure it does NOT depend on settings done in a profile or whatever. Do not depend on "lucky" circumstances.

You make sure that all settings required by the script are done within the script. The script should be independant of settings elsewhere. This way you are also sure it will run as a cron job.