Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ cat readpipe.sh
#!/bin/bash
FILE=/tmp/test.pipe
rm $FILE
mknod $FILE p
read -t 3 <>$FILE answer
echo $? $answer
$ cat writepipe.sh
#!/bin/bash
FILE=/tmp/test.pipe
echo "test" >$FILE
ターミナルを二つ開いて片方で readpipe.sh を、もう片方でwritepipe.shを実行する
タイムアウトを取れるし出力内容を受け取れる
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.