[Haskell-beginners] Reading a list of null-terminated filenames from stdin?
strombrg at gmail.com
Sat Oct 10 19:40:26 UTC 2015
First off, thanks for your response.
On Sat, Oct 10, 2015 at 12:14 PM, Karl Voelker <karl at karlv.net> wrote:
> > On Oct 10, 2015, at 11:45 AM, Dan Stromberg <strombrg at gmail.com> wrote:
> > If I want to read a list of filenames, each terminated with a nul byte,
> from stdin (kind of like xargs -0), what's the best way to do that in
> Haskell? Or am I swimming against the current to do anything but
> It looks like all the stdin-specific functions are line-oriented, but you
> can use "Data.ByteString.hGet stdin”.
I'm very much a Haskell newb, but does Data.ByteString.hGet stdin read a
fixed (maximum) number of bytes, rather than a nul terminated sequence of
> Google's top hit is:
> > ...but I don't see anything about nul termination there. I checked the
> top ~5 hits, and didn't find much.
> I don’t think it matters in this case, but you should be aware that Google
> does not always find the most recent results when it comes to Hackage
> packages. (See my link above.
I'll keep that in mind.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners