Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] netbios name

Expand Messages
  • Trap 13
    ... $client_file[$count]=~ s/ ..*//gi;
    Message 1 of 2 , Oct 15, 2001
    • 0 Attachment
      On Mon, Oct 15, 2001 at 09:23:57AM -0000, toni_t_banire@... wrote:
      > Hello
      >
      > I am trying to generate a list of servers with just their netbios
      > names.
      >
      > I am dumping the server names into a file from a log file but some of
      > them are lsted with their DNS names.
      >
      > What I need to do is search for servers listed with their DNS names
      > and then delete the all characters after the first "." .
      >
      > For exmaple
      > croning.uk.gov.com
      >
      >
      > I would like to have all chars after the word croning to be deleted.
      >
      > I tried this statement
      >
      > open(INFILE, "$client_folder\\server.log") || die ("Cannot open file
      > $client_folder\\server.log");
      > open(TOT_CL, ">$client_folder\\server.log") || die ("Cannot open file
      > $client_folder\\server.log");
      >
      > @client_file=<INFILE>;
      >
      > $count = 0;
      > while ($client_file[$count] ne "") {
      > $client_file[$count]=~ s/[.+]com//gi;

      $client_file[$count]=~ s/\..*//gi;


      > $count++;
      > }
      > print TOT_CL @client_all;
      >
      >
      > unfortunately the above search and delete command only deletes
      > the .com portion of the DNS name instead of .uk.gov.com .
      >
      > Can someone help me with the coding to delete all characters after
      > the first "." in the DNS name
      >
      >
      >
      > TIA
      >
      >
      > Toni
      >
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.