Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Regex to extract certain lines only from command output/text file.

by perl514 (Pilgrim)
on Mar 30, 2013 at 08:24 UTC ( #1026251=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    C:\perlscripts>more 3par.txt
    Id Name Persona -WWN/iSCSI_Name- Port
    
    ...
                             1122334455667799 3:3:1
                             1122334455667788   ---
                             1122334455667799 4:3:1
    
  2. or download this
    #!/usr/bin/perl
    use warnings;
    use strict;
    ...
    {
        print "$para" if $para =~ /---/;
    }
    
  3. or download this
    C:\perlscripts>perl test_3par_tp.pl 3par.txt
    Done writing to space_sep.txt.
    
    ...
    
    
    C:\perlscripts>
    
  4. or download this
    use Learning::Perl;
    use Beginning::Perl::Ovid;
    print "Awesome Books";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026251]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2014-09-02 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls