Created
November 9, 2022 08:11
-
-
Save Sir-Photch/9f300b8e301a5306b3564cd3ae4ecb82 to your computer and use it in GitHub Desktop.
Loop to write ascii-text to serial port
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [[ $# == 0 ]]; then | |
echo "Usage: send.sh <serial port>" >&2 | |
exit 1 | |
fi | |
echo "Writing to $1; Press Ctrl+C to exit" | |
echo | |
while : | |
do | |
read -p "> " message | |
echo -n "$message" > "$1" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment