Best practices on making an environmental variable to store email addresses for each
I am running Suse 9.1
Hey everyone I was wondering if you could provide me with some insight into solving my problem.
My users will, at times, run simple bash scripts. The output of these scripts will be emailed to them.
I would like to set up an environmental variable to store the userís email address.
I would like to call the variable from scripts so that users do not have to input their addresses every time they run a script.
Technically I know how to do all of this, but I am wondering what would be best.
I could create a small script in each userís directory. This script could initialize their email address as an environmental variable every time they log in. I donít currently run log in scripts but I believe I could write a single line script in /etc/profile.d/ to run a script in a userís home directory if I use the $HOME variable that could initialize the userís email environmental variable from a text file in the userís home directory.
Although I think this would work on a small and static scale and would allow users to automatically update their email addresses, I wonder if there is a more elegant solution. I worry that I might forget to add the required files to a userís home directory when I create it.