Re: [SLE] bash script for environment variables
From: Mike Dewhirst (miked_at_dewhirst.com.au)
Date: 04/25/05
- Previous message: Joe Morris (NTM): "Re: [SLE] K3B ?"
- In reply to: Ken Schneider: "Re: [SLE] bash script for environment variables"
- Next in thread: Anders Johansson: "Re: [SLE] bash script for environment variables"
- Reply: Anders Johansson: "Re: [SLE] bash script for environment variables"
- Reply: Ken Schneider: "Re: [SLE] bash script for environment variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 25 Apr 2005 23:11:50 +1000 To: suse-linux-e@suse.com
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.
>
>
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
- Previous message: Joe Morris (NTM): "Re: [SLE] K3B ?"
- In reply to: Ken Schneider: "Re: [SLE] bash script for environment variables"
- Next in thread: Anders Johansson: "Re: [SLE] bash script for environment variables"
- Reply: Anders Johansson: "Re: [SLE] bash script for environment variables"
- Reply: Ken Schneider: "Re: [SLE] bash script for environment variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|