How to send characters to Arduino serial using Linux command line without tail -f?
Arduinos have auto-reset circuit to reset the board if new connection is initiated on USB. It is good for convenient upload or to reset for debugging at Serial Monitor open. But it causes troubles if you want to communicate with MCU from computer over USB from command line tools, scripts, python, C++, C#, Java. Always on new connection the board resets.

One solution is to disable the auto-reset circuit. Other option is to wait a second after the connection while the board resets.