When I want to redirect an output of a.out program I will use
./a.out > output.txt
This doesn't work when the program reads something from stdin. How would you redirect output in this case?
I can do it only with
./a.out < inputs.txt > output.txt
Can I do the same but reading inputs from stdin?
EDIT: I realized that it works, but I can't see prompts because everything goes to file output.txt. So, the only problem is to see prompts on stdin and preserve redirection at the same time.