Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 imbibing at the Monastery: (9)
As of 2015-07-08 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (96 votes), past polls