Proyecto

General

Perfil

Descargar (808 Bytes) Estadísticas
| Rama: | Revisión:
23a384b9 Elisa
unit globales ;

{$mode objfpc}{$H+}

interface

uses
unix,Classes, SysUtils ;
var
g_contador:integer=0;
procedure Ejecutar (comando:string);
function HallarDato(Cmd:string):String;
implementation
procedure Ejecutar (comando:string);
begin;
unix.fpSystem(comando);
end;
function HallarDato(Cmd:string):String;
var
file1: TextFile;
s,t: ansistring;
n: longint;
j:integer;
begin
j:=0;
n:=popen(file1, Cmd, 'r');
if n=-1 then
begin
result:='';
Exit;
end;
t:='';
while not eof(file1) do begin
Readln(File1,s);
t:=t+s+Chr(10);
inc(j);
end;
pclose(file1);
result := trim(t);
end;
end .