Unix app versions

(imported topic written by jeko1791)

I’m having a hard time getting the versions of Unix apps installed, mostly because I’m not familiar with the Unix inspectors as well as Windows. Can someone help me adjust these so they return our expected results?

AIX:

if (name of operating system starts with “AIX”) then (if (exists product “pakcagename” of object repository) then (version of product “packagename” of object repository as string) else (nothings)) else (nothings)

Solaris:

if (name of operating system starts with “SunOS”) then (if (exists pkginfo (“pakcagename”) of pkgdb) then ((version of it as string) of pkginfo (“pakcagename”) of pkgdb) else (nothings)) else nothings

(imported comment written by BenKus)

What are they returning when you try them?

Ben

(imported comment written by NoahSalzman)

I assume that you spelled the word packagename differently in the actual action and just mis-typed it in the Forum?

(imported comment written by jeko1791)

yes, I replaced our packagename with “packagename”, but it could be for any installed package on the system. It’s actually a TSM Client were trying to get version number for. Any ideas how to write the statement to detect version of package installed for AIX and Solaris.

For reference, here’s how we’ve got it working for:

HP-UX:

if (exists product (“TIVsm”) of software depot) then ((revision of it as string) of product (“TIVsm”) of software depot) else (nothings)

Linux:

if (exists package (“TIVsm-BA”) of rpm) then ((version of it as string) of package (“TIVsm-BA”) of rpm) else (nothings)

(imported comment written by SystemAdmin)

jeko17

I’m having a hard time getting the versions of Unix apps installed, mostly because I’m not familiar with the Unix inspectors as well as Windows. Can someone help me adjust these so they return our expected results?

AIX:
if (name of operating system starts with “AIX”) then (if (exists product “pakcagename” of object repository) then (version of product “packagename” of object repository as string) else (nothings)) else (nothings)

Solaris:
if (name of operating system starts with “SunOS”) then (if (exists pkginfo (“pakcagename”) of pkgdb) then ((version of it as string) of pkginfo (“pakcagename”) of pkgdb) else (nothings)) else nothings

Very useful topic, just one correction “version of product” does not exist for AIX. There’s a “fileset of product” that seemed to have the version listed in it at least for the package I was looking for.