Created
August 26, 2019 03:11
-
-
Save tateisu/cb0c9ee75ab9eae1b7138d8bc6c4a6b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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