we have this CLI syntax
hdp-select | grep hadoop-client
hadoop-client - 2.6.4.0-91
the final goal is to get the number as example:
2640
we capture the last number & remove the -
and remove the .
so I did
hdp-select | grep hadoop-client | awk '{print $3}' | sed s'/-/ /g' | awk '{print $1}' | sed s'/\.//g'
2640
but this is ugly solution
I will happy to know other elegant solution