blob: 9ff6f2f05d323adbcfd0cda52e656caa7347dc55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{ Source provided for Free Pascal Bug Report 4038 }
{ Submitted by "Antonio Marti" on 2005-06-01 }
{ e-mail: windowze2000@yahoo.es }
{ %skiptarget=wince }
uses sysutils;
var b: byte;
s : string;
begin
{$ifdef unix}
s:='/bin/echo';
{$else}
{$ifdef windows}
s:='gecho';
{$else windows}
{$ifdef go32v2}
s:=FileSearch('gecho.exe',GetEnvironmentVariable('PATH'));
{$else go32v2}
{$IFDEF OS2}
s:=FileSearch('gecho.exe',GetEnvironmentVariable('PATH'));
{$ELSE OS2}
s:='echo';
{$ENDIF OS2}
{$endif go32v2}
{$endif windows}
{$endif}
writeln(executeprocess(s,'works1 works2 works3'));
writeln(executeprocess(s,'works1 works2 works3'));
writeln;
for b:=1 to 2 do
writeln(executeprocess(s,'fails1 fails2 fails3'));
end.
|