how to disable all non core module in drupal with drush

how to disable all non core module in drupal with drush.
First print all non core module with this command (warning it may take sometime)
drush pm-list --type=module --status=enabled | sed '/\((.*)\)/!d;/[Cc]ore.*-.*[Rr]equired/d;s/.*(\(.*\)).*/\1/' | sort > noncoremod.txt

Second issue the below command to disable all found modules
drush pm-disable $(cat noncoremod.txt)

And finally enable them again with this command
drush pm-enable $(cat noncoremod.txt)

Isn't drush and drupal fantastic?

Apache Yahoo News Feed

Drupal Yahoo News

Linux Yahoo News Feed

Mysql Yahoo News Feed