A
A
Alexey Sundukov2019-10-29 10:12:58
Erlang
Alexey Sundukov, 2019-10-29 10:12:58

Is it possible to send data to stdin of the called command in erlang?

If you call a system utility from erlang via erlang.org/doc/man/os.html#cmd-1 , is it possible, and how, to submit data to its input? Let's say I want to call the iconv utility by supplying utf8 to it, and with stdout I want to get windows-1251. Maybe?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2019-10-29
@rPman

is it ?
If pipes are not supported under windows, then wrap the call in a wrapper from the cmd /c command 'command < windows pipe or file > resulting file 'and use regular system pipes or temporary files

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question