Sadly my perl is not good enough to provide a real patch.  But this is
the idea in shscript:

file=/var/cache/apt/ftp.rfc822.org_debian-non-US_dists_sarge_non-US_Contents-i386.gz
line=$(zgrep -nm1 '^FILE *LOCATION$' "$file" |cut -d: -f1);
let line++ || true;
tail "+${line}" $file |grep $pattern 

In perl, it would be sufficient to add a pre-loop loop:

  while (<FILE>) {
        if (m/^FILE *LOCATION$/) last;
  }

  while (<FILE>) {
        # Match against pattern as before.
  }

I can't tell if this is appropriate for all forms of the source list,
though, so I'm not making a real patch.

Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to