I would like to know how to get the version information of an installed program that doesn't have the
If the program doesn't have any command line option that displays version information you can try to use
dpkg to get the package version which usually contains the program version ion some way.
dpkg -S "$(which YOUR_PROGRAM)"
prints the package that contains YOUR_PROGRAM, and
dpkg --status YOUR_PACKAGE | grep ^Version
prints the version of YOUR_PACKAGE.
You can put it all together:
dpkg --status "$(dpkg -S "$(which YOUR_PROGRAM)" | cut -d: -f1)" | grep ^Version
Use it for example like this for
dpkg --status "$(dpkg -S "$(which ls)"| cut -d: -f1)"| grep ^Version