Skip to content

Instantly share code, notes, and snippets.

@rushipkar90
Created September 25, 2015 16:22
Show Gist options
  • Save rushipkar90/e230fb4dc71ee93c0646 to your computer and use it in GitHub Desktop.
Save rushipkar90/e230fb4dc71ee93c0646 to your computer and use it in GitHub Desktop.
versioncheck.sh
find /home/*/public_html/ -type f -iwholename "*/wp-includes/version.php" -exec grep -H "\$wp_version =" {} \; > wordpress.txt
find /home/*/public_html/ -type f \( -iwholename '*/libraries/joomla/version.php' -o -iwholename '*/libraries/cms/version.php' -o -iwholename '*/libraries/cms/version/version.php' \) -print -exec perl -e 'while (<>) { $release = $1 if m/ \$RELEASE\s+= .([\d.]+).;/; $dev = $1 if m/ \$DEV_LEVEL\s+= .(\d+).;/; } print qq($release.$dev\n);' {} \; > joomla.txt
find /home/*/public_html/ -type f -iwholename "*/modules/system/system.info" -exec grep -H "version = \"" {} \; > drupal.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment