Re: ksh script w/o perl

Bob.Kelley_at_BRINKSINC.COM
Date: 01/29/04

  • Next message: Robert Miller: "Flatpanel rackmount 1U serial terminal?"
    Date:         Thu, 29 Jan 2004 15:35:47 -0600
    To: aix-l@Princeton.EDU
    
    

    for those who want to do the same use an array, it seems to be easiest

    cat /etc/oratab|grep apps|grep -v "#"|grep -v N|cut -c -8 |
    {
    let db_counter=1
    while read dbname;
    do
            export dbnames[$db_counter]=$dbname
            echo ${dbnames[$db_counter]}
            let db_counter="$db_counter + 1"
    done
    }

    Bobby Kelley Jr.
    972-877-5341

    |---------+---------------------------->
    | | Bob Kelley |
    | | |
    | | 01/29/2004 02:44 |
    | | PM |
    | | |
    |---------+---------------------------->
    >--------------------------------------------------------------------------------------------------------------------------------------------------|
      | |
      | To: aix-l@Princeton.EDU |
      | cc: |
      | Subject: ksh script w/o perl |
    >--------------------------------------------------------------------------------------------------------------------------------------------------|

    Anybody have a quick way to set each line of output from a file to a
    different variable without using perl?

    Eg

    [root@nad0019aixd05/home..oracle]# cat /etc/oratab|grep -v "#"|grep -v
    N|cut -c -8

    PRODUCES two lines:

    clipsdv1
    cashsqa1

    how can I painlessly set these in a script to variables DB1 and DB2?

    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: Robert Miller: "Flatpanel rackmount 1U serial terminal?"

    Relevant Pages

    • 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: script question
      ... Thks for the response Bill, ... 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: 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)
    • Re: elxcfg
      ... This is a followup on a previous post for anyone with an EMC SAN ... Bobby Kelley ... elxcfg is a tool you can use with Winblows to ... their use of the Company's electronic mail system. ...
      (AIX-L)