Re: [Guillem Jover] Parsing of dpkg status file considered harmful
Hi,
Frank Küster <frank@debian.org> wrote:
> Is there any particular reason why did you use the while loop?
Yes.
> Looking at the old code, I would have intuitively used
>
> md5sum=$(dpkg-query -W -f='${Conffiles}' $package | grep "$file[[:space:]]" | cut -f 3 -d ' ')
This has the problem that $file is interpreted as a regexp; it isn't an
exact match (for example, the . preceding file extensions would match
any character). I replaced that with a [ $foo = $bla ] test precisely to
avoid this problem.
--
Florent
Reply to: