ADB commands to get the adb version of mobile phone This might sound stupid, but after reading this post (which seem complete) I still dont see how to get the "abd version" of my android, the output I expect is something like this Android Debug Bridge version 1.0.31. I tried (based on this answer)adb shell and then adb version and I get /system/bin/sh: version: not found.

The reason I want to know it is to see if it is compatible with the adb version I have in my desk. Thanks!

UPDATE:
Although I could not see the adbd version of my android. At the end I did not matter as I could command my phone from my desk using the last release of adb here. So thanks all anyway for their contributions, cuz although I did not get exactly what I wanted it help me to reach the a solution to my problem.
First of all, Android since Marshmallow doesn't come with adb binary (client) anymore, but only with adbd (server), for communication with an adb client on Desktop. 

In a nutshell, this is how the communication takes place:


your Android device has adbd, a daemon, which is started during boot process, and listens on USB by-default for communication from desktop clients; 
your adb tool in your desktop acts as a client and sends request to adbd on your Android, and you get to run adb commands successfully subjected to fulfilment of certain conditions.


If there are compatibility concerns, they would arise if adbd is depreciated or adb client on your desktop is. To see the versions, run:


adb version                 // to check adb client version in your desktop
adb shell adbd --version    // to check adbd's version in your Android. Please note that some users reported error with this if executed without root access. 


You shouldn't be worried about adbd's version but only with adb client version in your Desktop since official adb client is backward compatible.

Now to the localized issues you ended up with.

You incorrectly executed the commands. Nowhere the linked answer instructed to execute adb shell version. The correct procedure is:


adb version // adb version (client) on your Desktop
adb shell   // launches shell on your Android device through adb client on Desktop
adb version // the version of adb (client) binary that used to come with Android prior to Marshmallow. 


The last two commands have no relevancy to your question since they intend to ascertain the version of the adb client in your Android. As I explained in the beginning, it is adbd (server) alone which communicates from Android device's end, not the adb binary in the Android. That binary in Android can be used, if available, to talk to other Android devices (USB-OTG, WiFi, etc.) or to the same device if adbd (server) is listening on network too. 

Also, when you ran adb shell version, it meant: launch a shell on Android and execute the command version. There is nothing named version which is to be executed, hence, you got the error.