On 12/10/2014 13:08, meino.cra...@gmx.de wrote:
Hi,

I want to send commands to ttyO1 (serial port on an embedded system).
The commands are one line each and terminated with CRL/LF (aka "DOS").

Since this will be done from a batch script, it should be possible
via commandline tools and non-interactively. The serial port is
already setup up the right way.

I tried

echo -n"blablabal\x0a\x0d"

Firstly, this command is missing the -e switch. Secondly, the order of the control characters is wrong. I would suggest the use of printf as it has fewer pitfalls.

# printf '%s\r\n' "command"

--Kerin

Reply via email to