Re: [SLE] bash script for environment variables

From: Mike Dewhirst (miked_at_dewhirst.com.au)
Date: 04/25/05

  • Next message: George Barnett: "Re: [SLE] bash script for environment variables"
    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
    

  • Next message: George Barnett: "Re: [SLE] bash script for environment variables"

    Relevant Pages

    • Re: [SLE] bash script for environment variables
      ... > setenv ISC_PASSWORD 999ans ... but it returns setenv command not found. ... > equivalent which can be called from a script? ... Ken Schneider ...
      (SuSE)
    • Re: logon/logoff scripts...
      ... I am using the %clientname% and %machine% name environment variables to ... each user you can specify a login script but nowhere do I see the ...
      (microsoft.public.backoffice.smallbiz2000)
    • Re: Startup script ?
      ... I.E where do I put the script ... Every process has a set of environment variables, ... If there is some script that runs apt-get ... that will get set whenever *lots* of users login, ...
      (Debian-User)
    • Re: exporting a variable to global shells
      ... Environment variables are a user-space concept - ... When the script is exiting the echo stdout's the proxy adress, ... setting up my network differently depending on where/what I connect to. ... With regard to actually *setting* the proxy server, ...
      (Debian-User)
    • RE: DBD::Oracle install failed for fork test in t/10general.t
      ... environment variables $ORACLE_SID and $TWO_TASK. ... the connection is local and a dedicated server is bequeathed ... I'm not sure what 'Unix init process' is, ... It works when I ran a script pointing to the 'blib'. ...
      (perl.dbi.users)