Re: [Guillem Jover] Parsing of dpkg status file considered harmful
Florent Rougon <f.rougon@free.fr> wrote:
> dpkg-query -W -f='${Conffiles}' "$package" \
> | while read file sum; do
> if [ "$file" = "$conffile" ]; then
> echo "$sum"
> found=1
> break
> fi
> done
Is there any particular reason why did you use the while loop? Looking
at the old code, I would have intuitively used
md5sum=$(dpkg-query -W -f='${Conffiles}' $package | grep "$file[[:space:]]" | cut -f 3 -d ' ')
Regards, Frank
--
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)
Reply to: