On Tuesday 04 December 2007 07:28, ciwei2103 wrote:
> thans for the reply.
>
> I modify the program a bit , the $cmd output looks like:
>
>Ident Symbolic Numeric Slot Type Status
>
> DF-1A 01A 1 1 DISK Online
> FA-4A 04A
thans for the reply.
I modify the program a bit , the $cmd output looks like:
Ident Symbolic Numeric Slot Type Status
DF-1A 01A 1 1 DISK Online
FA-4A 04A 4 4 FibreChannel Online
FA-13A13A 13 1
On Wednesday 28 November 2007 16:07, ciwei2103 wrote:
>
> Given a code segment:
>
> my $cmd = "/usr/symcli/bin/something";
> open (SYMCFG, " $cmd |" ) or die "cannot open $!\n";
>
> while ( ) {
> #print $_ if /FibreChannel Online$/ ;
> # extract fields from the matching line
> my ( $ident,
Given a code segment:
my $cmd = "/usr/symcli/bin/something";
open (SYMCFG, " $cmd |" ) or die "cannot open $!\n";
while ( ) {
#print $_ if /FibreChannel Online$/ ;
# extract fields from the matching line
my ( $ident, $fa , $type, $status ) = (split )[0,1,4,5] if /
FibreChannel Online$/