[HPADM] RE: scripting question

From: Lodge, David (David.Lodge_at_capitalone.com)
Date: 03/24/04

  • Next message: Joe Philip: "[HPADM] HP Storage Arrays"
    To: "'Lal, Neeraj'" <neeraj_lal@mcgraw-hill.com>, "'hpux-admin@DutchWorks.nl'" <hpux-admin@DutchWorks.nl>
    Date: Wed, 24 Mar 2004 07:12:23 -0500
    
    

     
    The following script; to call use: showline.sh 1
     
    $ cat showline.sh
    #!/usr/bin/ksh
     
    local LineNum=${1}
    awk -v lineno=${LineNum} '$1 == lineno { print $2 }'
     
    -----Original Message-----
    From: Lal, Neeraj [mailto:neeraj_lal@mcgraw-hill.com]
    Sent: 23 March 2004 19:18
    To: hpux-admin@DutchWorks.nl
    Subject: [HPADM] scripting question

    Hi Admins
     
    I have a quick scripting question
     
    I have file containing Line number and file name as shown below
     
         1 C710202.cs9
         2 C710202.idy
         3 C710202.lis
         4 C710202.pco
         5 C710202.sdb
     
    I want script where input will be say 1 it should echo C710202.cs9
                                input will be say 2 it should echo C710202.idy
                            input will be say 3 it should echo C710202.lis
     
    and so on
     
    I will summarise
     
    TIA
     
    Neeraj. Lal.
    Consultant
    The McGraw-Hill Companies Inc
    148 Princeton-Hightstown Road
    Hightstown, NJ 08520
    email: neeraj_lal@mcgraw-hill.com <mailto:neeraj_lal@mcgraw-hill.com>
     
     
    **************************************************************************
    The information transmitted herewith is sensitive information intended only
    for use by the individual or entity to which it is addressed. If the reader
    of this message is not the intended recipient, you are hereby notified that
    any review, retransmission, dissemination, distribution, copying or other
    use of, or taking of any action in reliance upon this information is
    strictly prohibited. If you have received this communication in error,
    please contact the sender and delete the material from your computer.

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Joe Philip: "[HPADM] HP Storage Arrays"