source: trunk/essentials/app-shells/bash/tests/redir5.sub

Last change on this file was 3228, checked in by bird, 18 years ago

bash 3.1

File size: 279 bytes
Line 
1# tests of ksh93-like dup-and-close redirection operators
2exec 9<$0
3
4f()
5{
6exec 5<$0
7
8exec 0<&5-
9
10while read line; do
11 echo "$line"
12done
13}
14
15f
16
17typeset -f f
18
19# make sure it was closed
20read -u 5 foo
21echo after read
22
23exec 5<&0
24
25exec <&-
26
27read abcde
28
29exec 0<&9-
30read line
31echo $line
Note: See TracBrowser for help on using the repository browser.