On 17 Jul 2011, at 13:32, Ludo Brands wrote:
> For this simple example it won't matter but for more complex ones using
> certain shell specifics it is a must to launch the correct shell. The sh
> symlink can point to anything.
Yes, but bash may not even exist.
Jonas
___
>
> 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.
>
For this simple example it won't matter but for more complex ones using
certain shell specifics it is a must to launch the corre
> > Cross platform solution:
> >
> > Uses process
> >
> > ...
> > p:=TProcess.Create(nil);
> > {$IFDEF WIN32}
> > p.CommandLine := 'cmd /c diff -r dir1 dir2 > diff.txt'; {$ENDIF}
> > {$IFDEF LINUX}
> > p.CommandLine := 'bash -c "diff -r dir1 dir2 > diff.txt"';
> > {$ENDIF}
> > p.Execute;