[HPADM] script question

From: Balaji Nathan (balajinathan2003_at_yahoo.com)
Date: 06/09/04

  • Next message: Balaji Nathan: "[HPADM] Re: script question - simplified - with file format"
    Date: Wed, 9 Jun 2004 10:53:22 -0700 (PDT)
    To: hpux-admin@DutchWorks.nl
    
    

    Hi Admins,
    I need your help on the following.
    I have a file (file1) with IP addresses (of the workstations)
    The idea is to replace the ip addresses with names.
    I am thinking:
    a. Get a list of ip addresses from the file1 and call the new file as file2
       do a nslookup on the content of file2 and create a file called file3
        and some how I have to have two columns on file3 like
        
        192.168.30.100 workstation1
        I do not know how to create the above format file (with two columns)
     
    b. Based on file3,I have to search and replace ip addresses with names on file1.
        In other words, using file3 contents, search a match for column1 (ip addresses) on file1 and replace with corresponding column 2 name.
    Is this doable?
    Please help.

                    
    ---------------------------------
    Do you Yahoo!?
    Friends. Fun. Try the all-new Yahoo! Messenger

    --
                 ---> 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: Balaji Nathan: "[HPADM] Re: script question - simplified - with file format"

    Relevant Pages

    • RE: [SLE] File Counts

      (SuSE)
    • Re: fopen() with full path affecting subsequent fopen calls
      ... Normally I would expect file2 to be written in the same place as it ... did when I didn't use the full path for file1. ... as well as file3 (which ... It's very likely a "current working directory" problem of some sort, ...
      (comp.lang.c)
    • Re: Problems with tar (tcllib)
      ... I have a simple script that uses the tcllibtarcommand. ...
      (comp.lang.tcl)
    • Re: Need Help
      ... eg: file1, file2, file3 etc ... This means that if script is executing file1, ...
      (comp.unix.shell)
    • Re: simple ln question
      ... that makes it so the contents of file1 are the same as of file2, and if you change the contents of 1, the other ... prints the inode number for the file foobar. ...
      (Fedora)