I am trying to write a shell script that creates a new window and run a minicom terminal (connected to /dev/ttyACM0) in that. Here's the script file my_script.sh:
#!/bin/bash
gnome-terminal --command minicom
echo "\n" >> /dev/ttyACM0
sleep 5
echo "\n" >> /dev/ttyACM0
echo "run x_boot" >> /dev/ttyACM0
sleep 5
echo "root" >> /dev/ttyACM0
sleep 3
echo "cd /tmp" >> /dev/ttyACM0
sleep 1
In the above code all the echo commands i'm passing directly to the device file not to the minicom terminal.
Requirements:
Please help me with this.
Use minicom scripting (runscript) instead of bash echoes. It has both send and sleep commands:
-S, --script=SCRIPT : run SCRIPT at startup
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments