#! /bin/bash PORT=/dev/pts/1 sleep 1 echo "write to $PORT" echo "a" > $PORT echo "read from $PORT" cat $PORT