Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: UNIX : script help/input

Re: UNIX : script help/input

From: Mladen Gogala <mladen_at_wangtrading.com>
Date: Wed, 01 Oct 2003 06:39:35 -0800
Message-ID: <F001.005D1AFB.20031001063935@fatcity.com>


#!/usr/bin/perl -w
use strict;
use bytes;
my ($NAME,$IP,@LB);
while (<>) {
chomp;
@LB=split /\s+/;
if ($LB[0] =~ /^name:/i) {

$NAME=$LB[1];

   }
if ($LB[0] =~ /^address:/i) {

$IP=$LB[1];

   write;
   }
}
format STDOUT=

@<<<<<<<<<<<<<<<<<< ,@<<<<<<<<<<<<

$NAME,$IP Received on Wed Oct 01 2003 - 09:39:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US