cat blah | tabler -s=x8x
cat README | myprogramname
Hmm.. It looks like what I need, but what I need to do with TProcess.CommandLine, if I need only to read pipe-out? Like this:
TProcess.CommandLine is the main binary to execute and the parameters ('cat README' in your case). You could read the output from TProcess.Output property, which then you feed into myprogramname (started with another TProcess instance) via TProcess.Input.
Looks like my English is worse, than i thought. I don`t need tor run anything else. I just need to get the information, that will be send to me. It mfy be cat, or grep after hundred of filters.
Sorry, I misunderstood then.
I assume that you want to read something in your program which is inputted via pipe? Am I right?
If so, then it's just standard input, you could read via Read(Ln)
[20:09:19][alex][~]: cat /proc/cpuinfoprocessor : 0vendor_id : GenuineIntelcpu family : 6model : 23model name : Pentium(R) Dual-Core CPU T4400 @ 2.20GHzstepping : 10cpu MHz : 1200.000cache size : 1024 KBfdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : nofpu : yesfpu_exception : yescpuid level : 13wp : yesflags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dtsbogomips : 4388.80clflush size : 64cache_alignment : 64address sizes : 36 bits physical, 48 bits virtualpower management:
program project1;{$mode objfpc}{$H+}{$R *.res}Var S : String;begin Read(S); WriteLn('!!! ' + S + ' !!!');end.
[20:09:19][alex][~]: cat /proc/cpuinfo | ./project1 !!! processors : 0 !!!
while not EOF do begin ReadLn(S); // do something with Send;