Skip to content

Instantly share code, notes, and snippets.

@sstults
Created March 20, 2013 03:13
Show Gist options
  • Save sstults/5202017 to your computer and use it in GitHub Desktop.
Save sstults/5202017 to your computer and use it in GitHub Desktop.
Count down (percentage done) of page_count_int updates
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