in a directory nearly 10 zipped file are available.
totally the size of the all files is nearly 15GB.
i have to retrive the line which dont have the text "ORA" from each file and i have to write this data to a another big file.
i got it but it is taking the time of nearly 5 minutes to complete the process.But i have to process 7 directories at a time..so totally it is taking so much time..
i wrote the code as..
Expand|Select|Wrap|Line Numbers
- !#use/bin/perl
- @filenames=</home/dir/*.gz>;
- open(OUT ,">bigfile");
- foreach $file(@filenames)
- {
- open(IN,"gzcat $file|");
- while($line=<IN>)
- {
- next if($line=~/^ORA | ^$/);
- print OUT $line;
- }
- close IN;
- }# end for
- close OUT;
if any one knows better way to do this..in order to reduce the time comlexity plz help me as i m new to perl.
thank & regards,
Manogna.