[fpc-devel] Running programs with output redirection
Andrew Haines
AndrewD207 at aol.com
Sun Jul 17 16:57:38 CEST 2011
On 07/17/11 05:50, Hans-Peter Diettrich wrote:
> Andrew Haines schrieb:
>
>> The best way I know is described here:
>> http://wiki.lazarus.freepascal.org/Executing_External_Programs#How_to_redirect_output_with_TProcess
>>
>
> Thanks for the link, I didn't know before that redirecting is such a big
> issue.
>
>
>> RunCommandAndDirectOutput('diff', '-r dir1 dir2', 'diff.txt');
>
> Can I tell diff to only compare *.xml files?
>
> I want to track modifications in the FPC/Lazarus docs files...
>
I don't know if diff can be made to only match files against a pattern
but it can _ignore_ files matching a pattern. Anyway I made a program
that can do what you want mostly. It may be useful to you or not.
Also the TProcess example is slightly simpler.
Regards,
Andrew Haines
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffpattern.lpr
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110717/7b19a654/attachment.ksh>
More information about the fpc-devel
mailing list