[m-users.] Pass stream or string to standard input of shell command

Dirk Ziegemeyer dirk at ziegemeyer.de
Mon Mar 16 23:56:10 AEDT 2020


Hello,

is it possible to pass an io.text_output_stream or string to the standard input of an operating system shell command called from within Mercury?

Instead of first writing output to a large text file on disk and then compressing it by calling gzip with

io.call_system("gzip FILE", Result, !IO)

I would rather pass the uncompressed stream or string directly to the standard input of gzip.

Dirk


More information about the users mailing list