function SaveToUnixFile(Filename, Text: String): Boolean;
var
F: File;
Escritos: Integer;
P1, P2: PChar;
i: Integer;
begin
P1:= PChar(Text);
P2:= P1;
i:= 0;
while Boolean(P2^) do
begin
if P2^ <> #13 then
begin
P1^:= P2^;
inc(P1);
inc(i);
end;
inc(P2);
end;
Result:= FALSE;
AssignFile(F,Filename);
{$I-}
Rewrite(F,1);
{$I+}
if IOResult = 0 then
begin
BlockWrite(F,PChar(Text)^,i,Escritos);
Result:= Escritos = i;
CloseFile(F);
end;
end;