Created
March 20, 2013 03:13
-
-
Save sstults/5202017 to your computer and use it in GitHub Desktop.
Count down (percentage done) of page_count_int updates
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
maxdocs=743364 | |
while (( numFound < maxdocs )) | |
do | |
numFound=`curl -s "http://solr.demo.dir.o19s.com:8983/solr/us_patent_grant/select?q=+invention_title_html:*%20AND%20+page_count_int:%5B1%20TO%20*%5D&qt=lucene&fl=id,invention_title_html,page_count_int&rows=0&indent=true&omitHeader=true" | grep numFound | awk -F '"' '{print $4}'` | |
echo $numFound $((100*${numFound}/${maxdocs}))"%" | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment