I am looking for a structured format of version info for OS-level executables, such as in
/usr/local/bin. The problem we are having is the inconsistent architecture between our PROD and TEST environments and we are finding that many executables in our lower environments have had patches applied whereas PROD has not, which invalidates a lot of testing -- stuff works in TEST but doesn't in PROD because of such system discrepancies.
So I would like to run a system assurance check to list all executables and get the version number but nothing else and then produce deltas. Some commands don't support the
-version option but even those that do display very verbose, free-text format of a version narrative and the version number is buried somewhere within, with no way to extract it programmatically.
Alternatively, I was thinking to run a file-level
cksum for every executable as an option of last resort but I was hoping that there would be a way to extract version info relevant fields programmatically.