I have a readline-based application with a prompt, however I'd like it to not show when the input is not interactive.
$ ./readline-app < command-list > result
$ cat result
prompt> Output line 1
prompt> Output line 2
prompt>
$
How can I make the prompt to not print in this case?