adb shell dumpsys package my.package | grep versionName
as mentioned by @david and @Jeremy Fishman. This will be much quicker than:
adb shell dumpsys | grep -A18 "Package \[my.package\]"
adb shell dumpsys package my.package | grep versionName
as mentioned by @david and @Jeremy Fishman. This will be much quicker than:
adb shell dumpsys | grep -A18 "Package \[my.package\]"