Mercurial > hg > toybox
view scripts/minicom.sh @ 1339:a3844a8132bc draft
Isaac Dunham also reported that some diff implementations can't handle nonseekable input, so write to a temporary file instead of <(command).
Use trap EXIT to make sure the temporary files get deleted.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 08 Jun 2014 14:01:37 -0500 |
parents | 2428870ce50c |
children |
line wrap: on
line source
#!/bin/bash # If you want to use toybox netcat to talk to a serial port, use this. if [ ! -c "$1" ] then echo "Usage: minicom.sh /dev/ttyS0" exit 1 fi SPEED="$2" [ -z "$SPEED" ] && SPEED=115200 stty $SPEED -F "$1" stty raw -echo -ctlecho -F "$1" stty raw -echo # Need to do it on stdin, too. ./toybox netcat -f "$1" stty cooked echo # Put stdin back.