how do i read data from a unix command?

Garry Hodgson garry@REDACTED
Wed Nov 14 19:00:18 CET 2001

is there a way i can read the output of a unix command using something
akin to the file:read() functions?  i'd like to open a pipe and get back
a file
that i can do reads from.  something like:

    { ok, FP } = file:open( File, read )
	file:read( FP, ?BUFSIZE )

i know about os:cmd(), but that reads the whole thing at once, 
and the files i'm reading are way too big for that.


Garry Hodgson                   One way or another
Senior Hacker                   One way or another
Software Innovation Services    One way or another
AT&T Labs                       This darkness got to give...

More information about the erlang-questions mailing list