Re: script question

Bob.Kelley_at_BRINKSINC.COM
Date: 02/10/04

  • Next message: JOSEPH KREMBLAS: "Re: script question"
    Date:         Tue, 10 Feb 2004 11:19:34 -0600
    To: aix-l@Princeton.EDU
    
    

    Thks for the response Bill, maybe I'm missing something here:

    export count=1
    export redo_1=/tmp
    export variable_test=${redo_}${count}

    echo $variable_test
    Yields "1"

    Whats wrong with my syntax?

    Bobby Kelley Jr.
    972-877-5341

    |---------+---------------------------->
    | | Bill Verzal |
    | | <BVerzal@KOMATSUN|
    | | A.COM> |
    | | Sent by: IBM AIX |
    | | Discussion List |
    | | <aix-l@Princeton.|
    | | EDU> |
    | | |
    | | |
    | | 02/10/2004 10:40 |
    | | AM |
    | | Please respond to|
    | | IBM AIX |
    | | Discussion List |
    | | |
    |---------+---------------------------->
    >--------------------------------------------------------------------------------------------------------------------------------------------------|
      | |
      | To: aix-l@Princeton.EDU |
      | cc: |
      | Subject: Re: script question |
    >--------------------------------------------------------------------------------------------------------------------------------------------------|

    ${REDO_MP_TO}_${DB_COUNT}
    --------------------------------------------------------

    "If everything is coming your way, then you are in the wrong lane"

    Bill Verzal
    AIX Administrator, Komatsu America
    (847) 970-3726 - direct
    (847) 970-4184 - fax

                 Bob.Kelley@BRINKS
                 INC.COM
                 Sent by: IBM AIX To
                 Discussion List aix-l@Princeton.EDU
                 <aix-l@Princeton. cc
                 EDU>
                                                                       Subject
                                           script question
                 02/10/2004 10:26
                 AM

                 Please respond to
                      IBM AIX
                  Discussion List
                 <aix-l@Princeton.
                       EDU>

    I have two variables which are holding spots for mount points.

    for i in 1 2
    do
          export xx=DB$DB_COUNT=$i
          export REDO_MP_TO_$DB_COUNT=/apps/"$i"
    done

    Now I want to use them with commands and such

    EG.
    ...
    for i in 1 2
    do
          cd $REDO_MP_TO_$DB_COUNT
    done

    but this fails to evaluate correctly in the second loop. How do I get the
    $REDO_MP_TO_$DB_COUNT to be recognized as "/apps/1" and "/apps/2" for input
    to the cd command?

    Bobby Kelley Jr.
    972-877-5341

    NOTICE TO BRINK'S EMPLOYEES:
    All electronic mail communications composed, sent, received or stored on or
    through Brink's equipment are subject to the Brink's Electronic
    Communications Policy. Employees should have no expectation of privacy in
    their use of the Company's electronic mail system.


  • Next message: JOSEPH KREMBLAS: "Re: script question"

    Relevant Pages

    • Re: script question
      ... Subject: script question ... Thks for the response Bill, ... Bobby Kelley Jr. ... All electronic mail communications composed, sent, received or stored on ...
      (AIX-L)
    • Re: concurrent volume groups
      ... Bobby Kelley Jr. ... Anyone know if concurrent volume groups can be used now without HACMP ... All electronic mail communications composed, sent, received or stored on or ... their use of the Company's electronic mail system. ...
      (AIX-L)
    • Re: ksh script w/o perl
      ... Bobby Kelley Jr. ... how can I painlessly set these in a script to variables DB1 and DB2? ... All electronic mail communications composed, sent, received or stored on or ... their use of the Company's electronic mail system. ...
      (AIX-L)
    • Re: concurrent volume groups
      ... Subject: concurrent volume groups ... Bobby Kelley Jr. ... All electronic mail communications composed, sent, received or stored on or ... their use of the Company's electronic mail system. ...
      (AIX-L)
    • Re: lost root password
      ... Bobby Kelley ... NOTICE TO BRINK'S EMPLOYEES: ... All electronic mail communications composed, sent, received or stored on or ... their use of the Company's electronic mail system. ...
      (AIX-L)