shell/理解输入和输出/创建自己的重定向/创建读写文件描述符.sh

8 lines
133 B
Bash
Raw Permalink Normal View History

2016-05-15 09:51:46 +08:00
#!/bin/bash
# testing inpiut/output file descriptor
exec 3<> test
read line <&3
echo "Read: $line"
echo "This is the test line" >&3