Hi All,
I am very new to lazarus, but used to delphi. I have ported across a lazarus program to a mac, and all seems fairly well, except that I need to get some info on gateway IPs and MAc addresses.
This command from a terminal window works fine:
route -n get default | grep "gateway"
But when I do a runcommand to get the output into a variable tempstr with
runcommand('route -n get default | grep "gateway"',tempstr)
it compiles fine, but comes back with an empty string.
runcommand('route -n get default', tempstr)
works fine, but isnt quite what I want.
I have tried experimenting with single quotes, and square brackets but have not made it work yet. I suspect it may require an eval command, but am unsure how to use it.
Can anyone guide me?
Many thanks for your patience!
DAvid