Re: list package version if installed (scriptable)

2021-01-07 Thread Andy Smith
Hi Jim, On Thu, Jan 07, 2021 at 08:12:52AM -0500, Jim Popovitch wrote: > What is a script'able way to list a pkg version (or nothing if it is not > installed)? $ dpkg-query --showformat '${Version}\t${Status}\n' --show coreutils 8.23-4 install ok installed $ dpkg-query --showformat

Re: list package version if installed (scriptable)

2021-01-07 Thread Greg Wooledge
On Thu, Jan 07, 2021 at 08:12:52AM -0500, Jim Popovitch wrote: > What is a script'able way to list a pkg version (or nothing if it is not > installed)? > > +1 for POSIX compatibility. unicorn:~$ dpkg-query --show --showformat '${Version}\n' bash 5.0-4 unicorn:~$ dpkg-query --show --showformat

list package version if installed (scriptable)

2021-01-07 Thread Jim Popovitch
Hello! What is a script'able way to list a pkg version (or nothing if it is not installed)? +1 for POSIX compatibility. tia, -Jim P.