sed

Print section of a string
Extract “2.3” from “hadoop-client - 2.3.2.0-2950”

echo "hadoop-client - 2.3.2.0-2950" | sed 's/hadoop-client - \([0-9]\.[0-9]\).*/\1/'