as titled, how do I know which version of spark has been installed in the CentOS?
The current system has installed cdh5.1.0.
In order to print the Spark's version on the shell, following solution work.
SPARK_VERSION=$(spark-shell --version &> tmp.data ; grep version tmp.data | head -1 | awk '{print $NF}';rm tmp.data) echo $SPARK_VERSION