linux-tutorial/codes/shell/输入和输出/创建自己的重定向/创建读写文件描述符.sh

9 lines
142 B
Bash
Raw Permalink Normal View History

2019-10-29 18:22:19 +08:00
#!/usr/bin/env bash
2019-10-10 08:56:31 +08:00
2019-05-10 11:17:57 +08:00
# testing inpiut/output file descriptor
exec 3<> test
read line <&3
echo "Read: $line"
echo "This is the test line" >&3