Você precisa verificar o status impresso por dpkg -l
, exemplo:
$ dpkg -l firefox-esr vim winff
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-====================================-=======================-=======================-=============================================================================
hi firefox-esr 52.9.0esr+build2-0ubunt amd64 Safe and easy web browser from Mozilla
ii vim 2:8.1.1198-0york0~14.04 amd64 Vi IMproved - enhanced vi editor
rc winff 1.5.3-3 all graphical video and audio batch converter using ffmpeg or avconv
Aqui ambos vim
e firefox-esr
estão instalados, você pode digitar:
$ dpkg -l firefox-esr | grep -q ^.i && echo This package is installed. || echo This package is NOT installed.
This package is installed.
$ dpkg -l vim | grep -q ^.i && echo This package is installed. || echo This package is NOT installed.
This package is installed.
$ dpkg -l winff | grep -q ^.i && echo This package is installed. || echo This package is NOT installed.
This package is NOT installed.