I had compiled a cpp (c++) file, which generated an executable (a.exe
file) in Windows.
In Linux, a.out
file would be generated.
I want to run the executable but I do not want to manually enter the inputs that the executable needs.
Hence, I aim to feed the inputs from a saved file to the executable.
For example, the bash equivalent would be
$ ./a.out < testfile
In Windows (Windows Powershell / pwsh), I want to run my a.exe
instead of a.out
.
The testfile
here contains some text data to feed to the executable (which is not important), for example:
3
123
1234
12344
I just want to feed the executable, some input from an existing file.
How do I do it?