The example reads but doesn't write, so you'll need some content. Let's make the script itself content addressable.
The script took that algorithm you gave, executed it, and checked to see that the digest matched. If it did, it returned the content to you.
The second grep statement pulls out the algorithm from the request and executes it. It could easily be written more verbosely as such: