Get the Drupal major version using Drush
You know, for kicks.
drush status | grep "Drupal version" | awk -F ':' '{print $2}' | sed 's/^ *//'
Written by Jon Peck
Related protips
1 Response
Could be done with only drush with with a few options:
drush @site status --fields=drupal-version --field-labels=0
If you only want the major version of Drupal you can use awk to get only that:
drush @site status --fields=drupal-version --field-labels=0 | awk -F. '{print$1}'
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Drush
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#