Can't send legato command with system()

Hi,

I use Legato 20.04 with a WP8548 on a Mangoh Red.
My application is unsandboxed .

In my application I can use system command like :

system(“ls -l >> /home/test.txt”);

but if I want to use

system(“logread | grep MyApp >> /home/test.txt”);

or

system(“cm radio >> /home/test.txt”);

I have a error:

sh:
logread: not found

or

sh:
cm: not found

Do I need to add something in my .adef to use cm or logread with system() ?

Thanks,
Jeremy

You need to use absolute path of logread and cm.

You can search by

find / -name “logread”

1 Like