#!/bin/bash if [[ $# < 1 ]]; then echo "usage: $0 " exit fi if [[ ! -e $1 ]]; then echo "$1 not found"; exit 1 fi socat "file:$1,nonblock,raw,echo=0,b${2:-9600}" "readline"