M
muquaddim
Hi,
I have a program prog.exe. which takes IP as input its owner
information as output.
if input.txt contains,
xx.xx.xx.xx
yy.yy.yy.yy
zz.zz.zz.zz
now see how it works.
c:\> prog.exe xx.xx.xx.xx yy.yy.yy.yy > output.txt
it generates output.txt with contact info for each ip.
if I don't pass any command line argument it takes input from stdin.
c:\> prog.exe
xx.xx.xx.xx // my input
(e-mail address removed) // contact info
yy.yy.yy.yy // my input
(e-mail address removed) // contact info
to break the program I have to press Ctrl+C
Now if I use input redirection operator
c:\> prog.exe < input.txt
(e-mail address removed)
(e-mail address removed)
(e-mail address removed)
In this point my program waits for standard input too.
I want my program should process all the input and output the data
then exit. no wait.
For this problem I can not run the following command,
C:\> prog.exe < input.txt > output.txt
I never know whether the program has ended.
The simple Code can be found in http://nopaste.info/31b391011b.html
Please give me a solution.
Thanks in Advance.
I have a program prog.exe. which takes IP as input its owner
information as output.
if input.txt contains,
xx.xx.xx.xx
yy.yy.yy.yy
zz.zz.zz.zz
now see how it works.
c:\> prog.exe xx.xx.xx.xx yy.yy.yy.yy > output.txt
it generates output.txt with contact info for each ip.
if I don't pass any command line argument it takes input from stdin.
c:\> prog.exe
xx.xx.xx.xx // my input
(e-mail address removed) // contact info
yy.yy.yy.yy // my input
(e-mail address removed) // contact info
to break the program I have to press Ctrl+C
Now if I use input redirection operator
c:\> prog.exe < input.txt
(e-mail address removed)
(e-mail address removed)
(e-mail address removed)
In this point my program waits for standard input too.
I want my program should process all the input and output the data
then exit. no wait.
For this problem I can not run the following command,
C:\> prog.exe < input.txt > output.txt
I never know whether the program has ended.
The simple Code can be found in http://nopaste.info/31b391011b.html
Please give me a solution.
Thanks in Advance.