- edited description
Communication aspects of interactive mode to stderr
Most programs with an interactive mode (swipl
, gnuplot
, ...) use the stderr
instead of the stdout
for communication aspects. For instance the >
marks for the terminal. Only commands who call for output (like print
) feed the stdout
...
Doing this makes it easier to use the output of one program and feed it as input to the second program...
Comments (3)
-
reporter -
As far as I know, this is only the case in interactive mode? Or are there specific use cases we missed? Is there a use-case to pipe interactive mode?
-
reporter Yes, my interactive renderer :D (I solved it although in a less elegant way). Another one: say for instance I have a theory, and I want to do something without knowing the exact theory in advance, I might write a file (
bar.prgrm
) and the result is then written to another file usingidp -i foo.idp < bar.prgrm > result
...One could for instance immediately draw the structure by performing something like:
idp -i foo.idp < bar.prgrm | clang | idpdraw
. If you look at thedemo.sh
file, the result is first written to a file, then clang produces another file and finally the content is given to the idp-draw program. A lot of useless I/O... - Log in to comment