Hello fellows ...
I'm writing an application that receives the input from a pipe like:
tcpdump | myapp
I just want to hide the informations (maybe a redirection) that will be sent to readln().
Does anybody can help me ?
Thanks in advance !
Neilson

Mailing lists / fpc-pascal / 2001-08
7 messages · 5 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello fellows ...
I'm writing an application that receives the input from a pipe like:
tcpdump | myapp
I just want to hide the informations (maybe a redirection) that will be sent to readln().
Does anybody can help me ?
Thanks in advance !
Neilson
When you want to support redirection you can't use the crt unit.
Hi Peter !
Does exist another way to receive this input ???
Thank you !
Neilson
Hi Peter ! Does exist another way to receive this input ???
You need to do nothing; Just read from standard input as you normally would. The only thing is that you cannot use the CRT unit when you want to do this, because then the input will be copied to the output at once - always.
Michael.
You need to do nothing; Just read from standard input as you normally would. The only thing is that you cannot use the CRT unit when you want to do this, because then the input will be copied to the output at once - always.
Can't he simply use the handle "stdin"?
You need to do nothing; Just read from standard input as you normally would. The only…
Hello Michael ...
But I must include an CRT (nCRT in my case) unit because some outputs will be show.
Readln() is the only one function to read from STDIN ?
Thank you a lot !
Neilson
If this is a stream from a re-direct maybe readkey would work for you?