Deactivating Magento modules with sed

Using sed to enable or disable Magento modules ... or just to replace text within some files.
created by on 2013-09-13

Find all deativated modules

Goto app/etc/modules:

grep -A 5 -B 5 -iR "<active>false</active>" .

Deactivate modules

sed -i 's%<active>true</active>%<active>false</active>%g' Enterprise_*.xml

Activate modules

sed -i 's%<active>false</active>%<active>true</active>%g' Enterprise_*.xml
Tags:
Fork allmark on GitHub