Get Magento Version on the Command Line
Jan 3, 2013 · 1 minute readCategory: magento
If you just want to get the Magento version on the command line quickly try this one liner:
php -r "require 'app/Mage.php'; echo Mage::getVersion(); "
Does exactly what you need