[fpc-pascal] Why does RunCommand not produce the correct output?

Bo Berglund bo.berglund at gmail.com
Tue May 2 17:24:47 CEST 2023

On Mon, 01 May 2023 11:00:56 -0400, Bo Berglund via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:

>I am trying to create a function to list the available serial ports on a Linux
>device. But I have trouble getting commands which work on a terminal to also
>work when run from my console program.
>When I run this conmmand in the terminal I get the correct reply:
>$ ls -l /sys/class/tty/*/device/driver | grep -v "platform/drivers/serial8250" |
>awk '{print $9}' | awk -F'/' '{print "/dev/" $5}'
>But when I use RunCommand() in FPC it does not work.

I have asked on the Lazarus forum too and there I gotr a solution for my base
problem so I do not need to use complex commands vua RunCommand.
See this thread:


Bo Berglund
Developer in Sweden

More information about the fpc-pascal mailing list