Problem setting env variable in script

From: Bright, Frank (FBright_at_UARTS.EDU)
Date: 11/21/03

  • Next message: Sajjad S Hashimi: "Sajjad S Hashimi is out of the office until 11/18/03"
    Date:         Fri, 21 Nov 2003 14:33:44 -0500
    To: aix-l@Princeton.EDU
    
    

    Hi,

    Hopefully this is a quick question. I wrote a script to set an enviornment
    variable based on the $USER value. The routine does not set the variable.
    Below is the case statement we are using. What is going wrong that it
    would not set the env variable ALLOW_AE_UDT in this routine? What is wrong
    that if I add the line to set the env var at the end it still will not work.

    I am using the Korn Shell on AIX 5.2.

    Thanks in Advance!!

    Frank
    fbright@uarts.edu

    #!/usr/bin/ksh

    # Trap common interrupts

    #

    case $USER in

    #

            frank)

                    echo 'Set to frank';

                    ALLOW_AE_UDT=NONE;

                    export ALLOW_AE_UDT;;

            *)

                    echo 'Set to all other users'

                    export ALLOW_AE_UDT=ALL;;

    esac

    ----------------------------------------------------------------------------
    ------------
    Frank M. Bright, Jr.
    Administrative Computing fbright@uarts.edu
    University of the Arts (A15) www.uarts.edu
    <http://www.uarts.edu/>
    320 S. Broad St. 215-717-6081(w)
    Philadelphia, PA 19102 215-717-6087(f)
    Colleague 17.0.14 AIX 5.2.0.1 Unidata 6.03


  • Next message: Sajjad S Hashimi: "Sajjad S Hashimi is out of the office until 11/18/03"

    Relevant Pages

    • Re: Problem setting env variable in script
      ... Problem setting env variable in script ... The routine does not set the variable. ... Frank M. ...
      (AIX-L)
    • Re: Problem setting env variable in script
      ... If you run the script with a ".", it will perform as you expect. ... AIX Administrator, Komatsu America ... The routine does not set the variable. ... Frank M. ...
      (AIX-L)
    • Re: Error handling bug on GetObject?
      ... I seem to have hit a bug in the error handling of VBScript. ... If Error Handling is not turned on, then the script crashes on the GetObject ... In a main routine, this code behaves exactly as expected. ...
      (microsoft.public.scripting.vbscript)
    • Re: Error handling bug on GetObject?
      ... I seem to have hit a bug in the error handling of VBScript. ... If Error Handling is not turned on, then the script crashes on the GetObject ... In a main routine, this code behaves exactly as expected. ...
      (microsoft.public.scripting.vbscript)
    • RE: Simple Script??
      ... Well, it is not the most elegant solution I have ever written, but the script ... Since you only needed to copy a file to every profile, ... full directory recursion in the routine. ... will copy a file called File.txt to the Start folder in every profile. ...
      (microsoft.public.windowsxp.security_admin)