Skip to content

Instantly share code, notes, and snippets.

@crittermike
Last active May 24, 2017 13:33
Show Gist options
  • Save crittermike/77105c5983d1fe687547e39fc83ccda2 to your computer and use it in GitHub Desktop.
Save crittermike/77105c5983d1fe687547e39fc83ccda2 to your computer and use it in GitHub Desktop.
Track Drupal migration process

Tracking migration progress of 14705 files (or any other arbitrary pre-known number)...

watch -n 10 'PROGRESS=$(drush @your-alias sqlq "SELECT COUNT(*) FROM file_managed") && echo "$PROGRESS => "$(awk "BEGIN {printf \"%.2f%\n\", $PROGRESS/14705 * 100}")'

Which outputs something like:

12074 => 82.11%

Updated every 10 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment