Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Wed, 27 Apr 2005 14:28:43 -0700
JupiterHost.Net wrote:
DBSMITH@xxxxxxxxxxxxxx wrote:
yes I agree I was a little ambiguous... I was in a hurry. sorry. Anyway
Then do it at a later time and do it right, I imagine most all of us are busy also :)
here is my updated code. and here is a sample output: My goal is to get all F01 which I am but I am having issues capturing all
Then you're doing a rube goldberg if that is indeed what you're trying to do:
# untested and prolly even more efficient way but it # illustrates enhancements to the original code
#!/usr/bin/perl use strict; use warnings; use Data::Dumper;
$ENV{PATH} = '/opt/SUNWsamfs/sbin:/usr/bin:/usr/sbin:/usr/local/log'; open V4, 'samcmd v4 2>&1 |' or die "unable to open pipe: $!";
my @last_col; for(<V4>) { chomp; my @tmp = split /\w+/; push @last_col, $tmp[ $#tmp ]; }
close V4; print Dumper \@last_col;
now @last_col has all of the F01... pieces of data.
You do realize that the characters 'F', '0' and '1' are included in the character class \w which split() is removing? :-)
John -- use Perl; program fulfillment .
- Follow-Ups:
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: JupiterHost.Net
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- References:
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: DBSMITH
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: JupiterHost.Net
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- Prev by Date: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Next by Date: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Previous by thread: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Next by thread: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Index(es):
Relevant Pages
|