in reply to Re^5: looking for speed!! large file search and extract
in thread looking for speed!! large file search and extract
Update: This will also match lines like:c:\> perl -n -e "print if /^PARTNAME/ && /PARTNAME$/ && $last; $last = + /^xyzdf/ && /xyzdf$/ ? $_ : ''" file1>file2 # file2: #PARTNAMEhjjhhjhjkjkjkjkjPARTNAME #PARTNAMEhjjh88888888888jkjkjkjkjPARTNAME #PARTNAMEhjjh8888iiiiiiiiiiiii888jkjkjkjkjPARTNAME
if that is unwanted you should use:xyzdf PARTNAMEXXXXPARTNAME
c:\> perl -n -e "print if /^PARTNAME/ && /PARTNAME$/ && $last; $last = + /^xyzdf/ && /.xyzdf$/ ? $_ : ''" file1>file2
|
|---|