Created
July 20, 2016 17:25
-
-
Save a1exlism/afe86965ce03da94954f540ed7d94b72 to your computer and use it in GitHub Desktop.
linux pipe
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
Linux中标准输入为0,标准输出为1,标准错误输出为2 | |
$./a.out 0 就是测试标准输入是否可读。因为默认标准输入是终端,终端是可读可写的。故输出为read write | |
$ ./a.out 0 < /dev/tty 实际是$ ./a.out 0 0< /dev/tty是把/dev/tty重定向为标准输入,而/dev/tty是只读的,…… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment