On 2009-02-17, Tim Chase <python.l...@tim.thechases.com> wrote:
>> Assuming this is a real task and not a homework problem, then
>> I'd do it this way:
>> 
>>   $ cd [directory containing 50 test files]
>>   $ (for file in *; do head -n11 $file | tail -n5; done) 
>> >/path/to/results-file.txt
>
> I'd use sed:
>
>    sed -ns 7,11p /source/path/*.txt >/path/to/results.txt

Well done.

-- 
Grant Edwards                   grante             Yow! does your DRESSING
                                  at               ROOM have enough ASPARAGUS?
                               visi.com            
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to