1 2 3 4 5 6 7 8 9 10 11
#! /bin/bash PORT=/dev/pts/1 sleep 1 echo "write to $PORT" echo "a" > $PORT echo "read from $PORT" cat $PORT