Op 24-1-2025 om 15:10 schreef Terry A. Haimann via fpc-pascal:
I recently tried to execute a sed command from Lazarus, but didn't receive any 
output.  But when I imbedded the sed command in a script and then executed the 
script from tprocess, it worked fine.  Why is this?  I have run across similar 
issues from other Linux commands when trying to execute them from a Free Pascal 
program.  The work around I have found is to hide them in a script. Not pretty, 
but it works.

This looks dodgy, remove the "" quotes.

ArtProc.Parameters.Add('"' + IntToStr(b) + ',' + IntToStr(e) + 'p"');

Quoting is used by the shell to separate parameters, but with Parameters.Add we already have done the separation, so quoting is not needed nor supported.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to