14
14
// host unix_x unix_s
18
if prod(size(cmd))<>1 then error(55,1),end
21
tmp=strsubst(TMPDIR,'/','\')+'\unix.out';
22
cmd1= cmd + ' > '+ tmp;
24
tmp=TMPDIR+'/unix.out';
25
cmd1='('+cmd+')>'+ tmp +' 2>'+TMPDIR+'/unix.err;';
30
rep=read(tmp,-1,1,'(a)')
31
if size(rep,'*')==0 then rep=[],end
32
case -1 then // host failed
33
disp('host does not answer...')
17
// Modified by Allan CORNET 2004
20
if prod(size(cmd))<>1 then error(55,1),end
37
write(%io(2),'unix_g: shell error');
25
tmp=strsubst(TMPDIR,'/','\')+'\unix.out';
26
if ver == 'Windows 98' | ver == 'Windows 95' then
27
cmd1= cmd + ' > '+ tmp;
29
tmp=TMPDIR+'\unix.out';
30
cmd1=cmd +'>'+ tmp +' 2>'+TMPDIR+'\unix.err';
40
msg=read(TMPDIR+'/unix.err',-1,1,'(a)')
33
tmp=TMPDIR+'/unix.out';
34
cmd1='('+cmd+')>'+ tmp +' 2>'+TMPDIR+'/unix.err;';
43
if size(rep,'*')==0 then rep=[],end
44
case -1 then // host failed
45
disp('host does not answer...')
49
if ver == 'Windows 98' | ver == 'Windows 95' then
50
write(%io(2),'unix_g: shell error');
53
msg=mgetl(TMPDIR+'\unix.err')
58
msg=mgetl(TMPDIR+'/unix.err')
64
if ver == 'Windows 98' | ver == 'Windows 95' then
65
host('if exist '+tmp+' del '+tmp);
67
host('if exist '+tmp+' del '+tmp);
68
host('if exist '+TMPDIR+'\unix.err'+' del '+TMPDIR+'\unix.err');