Search code examples
haskellhaskell-turtle

Binary redirection in Turtle


I would like to do something similar to:

curl -s http://example.com/some/file.bin >/usr/local/bin/foo

Since Shell is polymorphic, I can probably do this with Turtle as-is, but all the examples operate on lines of Shell Text and I haven't internalized enough Haskell to navigate it. Is there an idiomatic way to get Shell Bytestring or another solution?


Solution

  • As of version 1.3.0, Turtle now has a Turtle.Bytes module just for this:

    https://hackage.haskell.org/package/turtle/docs/Turtle-Bytes.html