user128403: Suppose I want to obtain the block hashes for all Bitcoin blocks numbered 1 through 50,000. What would be the best way to obtain this information? I could write a web scraper to pull it off web-based blockchain explorers but that would take forever to run.

user24925: Easy enough with your own Bitcoin node.
for height in {1..500000}; do echo "$height `bitcoin-cli getblockhash $height`"; done


128403: <p>Suppose I want to obtain the block hashes for all Bitcoin blocks numbered 1 through 50,000. What would be the best way to obtain this information? I could write a web scraper to pull it off web-based blockchain explorers but that would take forever to run.</p>
 24925: <p>Easy enough with your own Bitcoin node.</p>
<pre><code>for height in {1..500000}; do echo &quot;$height `bitcoin-cli getblockhash $height`&quot;; done
</code></pre>
