How to? TPIPE ... see output right away?

#1
WINDUMP.EXE is a network monitor (packet sniffer). I use it to produce console output like this.
Code:
windump: listening on \Device\NPF_{ED1ECC20-450A-4ABC-9C82-188211DAE7F6}
11:19:21.442540 IP 61.36.172.93.53680 > 72.230.84.149.1433: tcp 0
11:21:10.141435 IP 77.72.82.80.59801 > 72.230.84.149.4147: tcp 0
11:22:17.461848 IP 74.194.6.5.55649 > 72.230.84.149.2222: tcp 0
11:22:26.598176 IP 5.188.62.25.49605 > 72.230.84.149.8545: tcp 0
I see the output right away, that is, as soon as the packet arrives.

I want to pipe to "TPIPE /replace" to pick certain data from each line. But when I do that, I don't see any output until I terminate WINDUMP with Ctrl-C. This is unlike, for example, piping to GREP.EXE which shows me the output immediately.

Can I get TPIPE to show me the output right away?
 
#3
Judging by the command description, no.
Why do you say that? The help says:
Code:
If you don't specify an input filename, TPIPE will read from standard input if it has been redirected. If you don't specify an output filename, TPIPE will write to standard output.
Calling that true is a stretch. What actually seems to happen when you "command | tpipe" is one of these (1 would be my guess).

1. The output of the command is sent to a file and then TPIPE acts on the file.
2. TPIPE writes to a TMP file, and after the command has finished, writes the TMP file to standard output.

Rex, can't it be made to really read from standard in and write to standard out?
 

rps

Jul 6, 2008
292
4
#4
Why do you say that? The help says:
Code:
If you don't specify an input filename, TPIPE will read from standard input if it has been redirected. If you don't specify an output filename, TPIPE will write to standard output.
Calling that true is a stretch. What actually seems to happen when you "command | tpipe" is one of these (1 would be my guess).

1. The output of the command is sent to a file and then TPIPE acts on the file.
2. TPIPE writes to a TMP file, and after the command has finished, writes the TMP file to standard output.

Rex, can't it be made to really read from standard in and write to standard out?
Based on a log file entry #2 is true, tpipe is creating a temporary file and then "typing" it to the screen, then the temp file is gone.
I see this when just entering tpipe directly without any pipe or re-direction.

When I execute:
Code:
tpipe /input=%JPsoft\varlist-master.lst /grep=3,0,0,0,0,0,0,0,"^^([\w]*+)(\=)|^^\.(\w*+)\="
Which produces the expected display and this in the log:
Code:
..............................................

     .........   C:\JPSoft\TCMD21x64\TCC.EXE /c TYPE C:\Users\rps\AppData\Local\Temp\TPI3C40.tmp [456]
[ 9/24/17 15:58:01][456] quit
[ 9/24/17 15:58:01][456] TYPE C:\Users\rps\AppData\Local\Temp\TPI3C40.tmp
....................
This shows the delayed output from tpipe being a temp file as you suspected.

TPIPE starts a transient TCC instance during this file processing.

Using:
Code:
 [I]type %jpsoft\varlist-master.lst |! tpipe /grep=3,0,0,0,0,0,0,0,"^^([\w]*+)(\=)|^^\.(\w*+)\=" |! view
The results and log entries are similar. Meaning the temp file name is different, but the sequence of execution is the same.
It seems the transient TCC is a result of TPIPE in both the piped input or cmd line with input=file.

So, it is obvious that, at present, there isn't a direct to STD output using TPIPE as your OP observed.

If you really need this, add it to the suggestions. I don't see the need myself.