retrieve a list of active plugins from shell script

source : wp-hackers digest # 67,11,4.

export retrieve_active_plugins="SELECT option_value FROM wp_options
WHERE option_name = 'active_plugins';"

mysql -u uname -e "$retrieve_active_plugins" -h hostname -p dbname | grep '{' | sed -e 's/i:[0-9]\+;s:[0-9]\+:"/\n/g'| egrep -v 'a:[0-9]+' | sed -e 's/";//g' | sed -e 's/\}//g'
 
 
Creative Commons License
This work by maniac.vardhan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
 
 

0 comments :: retrieve a list of active plugins from shell script

Post a Comment