Extract lines matching pattern list - sort output
Posted: Fri Dec 30, 2016 10:24 pm
Good day.
Whether it's possible putting extracted lines in output file in the same order in which they were found?
Here is an example:
Extract lines matching perl pattern/using this text:
41401
41484
41486
41556
Output looks like this:
/done/DiB-41486 Auto Repair & ServiceBrake Repair.xls
/done/FM-41401 Locate Dealer Get A Quick Quote Estimate Payments.xls
/done/TS-41484 Home Improvements.xls
/done/TS-41556 Building Materials.xls
I need this:
/done/FM-41401 Locate Dealer Get A Quick Quote Estimate Payments.xls
/done/TS-41484 Home Improvements.xls
/done/DiB-41486 Auto Repair & ServiceBrake Repair.xls
/done/TS-41556 Building Materials.xls
i'm trying to sort output, but couldn't, because sought-for parameter of sort (5 digits) placed in lines haphazardly
Please help.
Whether it's possible putting extracted lines in output file in the same order in which they were found?
Here is an example:
Extract lines matching perl pattern/using this text:
41401
41484
41486
41556
Output looks like this:
/done/DiB-41486 Auto Repair & ServiceBrake Repair.xls
/done/FM-41401 Locate Dealer Get A Quick Quote Estimate Payments.xls
/done/TS-41484 Home Improvements.xls
/done/TS-41556 Building Materials.xls
I need this:
/done/FM-41401 Locate Dealer Get A Quick Quote Estimate Payments.xls
/done/TS-41484 Home Improvements.xls
/done/DiB-41486 Auto Repair & ServiceBrake Repair.xls
/done/TS-41556 Building Materials.xls
i'm trying to sort output, but couldn't, because sought-for parameter of sort (5 digits) placed in lines haphazardly
Please help.