Ken Schneider wrote:
On Mon, 2005-04-25 at 20:06 +1000, Mike Dewhirst wrote:
I know this isn't strictly SuSE but I'd like a spot of help if anyone has the time :) TIA
I want to set a couple of environment variables at the beginning of a bash script
Ken - thanks for your response. My remaining question is - how do I set them? Googling indicated this should work ... #!/bin/bash setenv ISC_USER xyz setenv ISC_PASSWORD 999ans ... but it returns setenv command not found. Looking at the man entry it seems setenv is a function to be called from a program. Is there an equivalent which can be called from a script? Thanks Mike which then calls some sql scripts and finally I want to
unset those variables at the end.
The idea is that if the database userid and password are set then I don't have to mention them in the sql scripts and they remain relatively private in my versioning system
I googled to a bash tute ( http://pegasus.rutgers.edu/~elflord/unix/bash-tute.html ) and I think I understand it but it ain't working for me.
Thanks
Mike
No need to unset them as they are only set for the environment of the running script, not for anything else.