Page MenuHomePhabricator
Paste P3012

search-self-closing
ActivePublic

Authored by tstarling on May 9 2016, 5:05 AM.
#!/bin/bash
for wiki in `</srv/mediawiki-staging/dblists/large.dblist`;do
namespace=$(echo 'print $wgContLang->getNsText(10);' | mwscript maintenance/eval.php --wiki="$wiki" )
echo -n "$wiki | "
for tag in div span; do
echo "$namespace:insource:$tag insource:/\<$tag [^>]*\/>/" | \
mwscript extensions/CirrusSearch/maintenance/runSearch.php --wiki="$wiki" \
| php -r '$r = json_decode(stream_get_contents(STDIN)); print "{$r->totalHits} | ";'
done
echo
done