donald99 has asked for the wisdom of the Perl Monks concerning the following question:
All is good. But when I try to write:system("echo -e "\xFF\x08\x01" >> /dev/ttyACM0");
It gives me syntax error. Do you guys have any idea why this is happening, and how I can espace this so that the command works? I suspect that the \x00 is a null byte that is terminating the command , thus the error. But how to fix?system("echo -e "\xFF\x08\x00" >> /dev/ttyACM0");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: null byte issue in system command ('\0' in C)
by tye (Sage) on Apr 01, 2015 at 01:19 UTC | |
|
Re: null byte issue in system command
by choroba (Cardinal) on Mar 31, 2015 at 22:41 UTC | |
|
Re: null byte issue in system command
by mr_mischief (Monsignor) on Mar 31, 2015 at 23:21 UTC | |
|
Re: null byte issue in system command
by afoken (Chancellor) on Apr 01, 2015 at 08:34 UTC | |
by Anonymous Monk on Apr 01, 2015 at 09:34 UTC |