读书人

知名管道 pipe fifo

发布时间: 2012-08-07 14:54:49 作者: rapoo

有名管道 pipe fifo
两个终端运行,一个输入,一个输出

#!/bin/shif [ ! -p /root/mytest/testpipe ]then    /bin/mknod /root/mytest/testpipe pfiwhile :do    read msg    if [ "$msg" = "" ]    then        continue    else        echo "$msg"    fidone < /root/mytest/testpipe


#!/bin/shtty=`who am i | awk '{print $2}'`#tty=pts/3while :do    echo "enter your name: \c" >/dev/$tty    read name    echo "$name haha"done > /root/mytest/testpipe


读书人网 >操作系统

热点推荐