In Windows, there exists a console trick
someprogram.exe < input.txt
which makes the program to get the input from input.txt whenever there is a input request. I want my program to behave differently when the input is read from another file. Is there are a way to do that? How?