[fpc-devel] Running programs with output redirection

David W Noon david.w.noon at ntlworld.com
Sun Jul 17 14:15:52 CEST 2011


On Sun, 17 Jul 2011 09:51:12 +0000, Mark Morgan Lloyd wrote about Re:
RE : RE : RE : [fpc-devel] Running programs with output redirection:

>Ludo Brands wrote:
[snip]
>> {$IFDEF LINUX}
>>   p.CommandLine := 'bash -c "diff -r dir1 dir2 > diff.txt"';
>> {$ENDIF}
>>   p.Execute;
>
>Might be safer to refer to sh rather than bash in this context, since 
>Debian and Ubuntu are moving from Bash to Dash with sh being an 
>appropriate symlink.

Even better would be to use the SHELL environment variable.  This is
established by the login shell and reflects each user's default shell,
as per /etc/passwd.
-- 
Regards,

Dave  [RLU #314465]
=======================================================================
david.w.noon at ntlworld.com (David W Noon)
=======================================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110717/87a7d1ae/attachment.sig>


More information about the fpc-devel mailing list