On 06/02/2014 13:06, Tino Sino wrote:
> I wonder, what's the golden way to do this and why?
It depends on what you're doing it for. If it's for a script, dpkg-query
is a better choice, because you can do --showformat
and it does not truncate version strings etc. 'dpkg -l' output
is really meant fo
On 06/02/2014 13:12, Gian Uberto Lauri wrote:
> (you could use grep -e '^ii') or egrep '^ii', but I think it's not
> worth the cpu used).
You don't need -e to use anchors in the regex. Whilst -e would use more
CPU than a plain grep, the anchor would likely reduce the work done
(lines can be matche
On 06/02/2014 14:06, Tino Sino wrote:
It has been asked before, but with different answers, e.g.:
1) dpkg-query --list | awk '/^ii +/ { print $2; }'
2) dpkg --get-selections | cut -f 1
3) ... etc ...
Given that the output is the same:
$ diff \
<(dpkg --get-selections | cut -f 1) \
On 02/06/2014 08:17 AM, iijima yoshino wrote:
> ?? Thu, 06 Feb 2014 14:06:44 +0100
> Tino Sino :
>
>> It has been asked before, but with different answers, e.g.:
>> 1) dpkg-query --list | awk '/^ii +/ { print $2; }'
>> 2) dpkg --get-selections | cut -f 1
>> 3) ... etc ...
>> Given that the out
?? Thu, 06 Feb 2014 14:06:44 +0100
Tino Sino :
> It has been asked before, but with different answers, e.g.:
> 1) dpkg-query --list | awk '/^ii +/ { print $2; }'
> 2) dpkg --get-selections | cut -f 1
> 3) ... etc ...
> Given that the output is the same:
> $ diff \
> <(dpkg --get-selec
Tino Sino writes:
> It has been asked before, but with different answers, e.g.:
> 1) dpkg-query --list | awk '/^ii +/ { print $2; }'
> 2) dpkg --get-selections | cut -f 1
> 3) ... etc ...
> Given that the output is the same:
> $ diff \
> <(dpkg --get-selections | cut -f 1) \
>
It has been asked before, but with different answers, e.g.:
1) dpkg-query --list | awk '/^ii +/ { print $2; }'
2) dpkg --get-selections | cut -f 1
3) ... etc ...
Given that the output is the same:
$ diff \
<(dpkg --get-selections | cut -f 1) \
<(dpkg-query --list | awk '/^ii +/ { pri
7 matches
Mail list logo