[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Faster 'dpkg -s'?

I see (at least) two possibilities:

1.  dpkg -s $PACKAGE

2.  sed -n -e "/^Package: $PACKAGE$/,/^$/p" < /var/lib/dpkg/status

The first is slow and the second fast, but I'm wary of using the
second in my code (what if the format of status changes?).  Are my
fears justified?  [I notice that bug uses the second...]


Reply to: