I am trying to write a basic one line Linux Bash command, which gives all the numbers between 1 - 1000 as an input to an exe program.
the exe program looks like this:
please insert 1: 1(wanted input)
please insert 2: 2(wanted input)
.
.
.
.
please insert 1000: 1000(wanted input)
success!
so I have tried writing this linux bash command:
for((i=1;i<=1000;i+=1)); do echo "$i"|./the_exe_file; done
but the problem is that my command OPENS the exe file on each iterate of the for... which means, only the first input (1) is right. And, for some reason, the input that is given to the exe file seems not to be good. what can I do? Where is my mistake?
Thanks in advance.