Created
July 5, 2014 00:52
-
-
Save Pross/22305cce8e7b1a26b00c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "" > spam.txt | |
for url in $(wp site list --field=url) | |
do | |
for id in $(wp --url=$url post list --field=ID) | |
do | |
printf ":" | |
content=$(wp --url=$url post get $id --field=content) | |
if [[ $content =~ .*viagra.* ]] | |
then | |
echo $url >> spam.txt | |
printf '[s]' | |
elif [[ $content =~ .*pharma.* ]] | |
then | |
echo $url >> spam.txt | |
printf '[s]' | |
else | |
printf '.' | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment