]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/redir8.sub
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / redir8.sub
CommitLineData
0001803f 1cd ${TMPDIR:=/var/tmp}
3185942a
JA
2rm -f u
3
4${THIS_SH} -c 'exec 10>&1; echo fd 10 >&10' 10>u
5cat u
6rm -f u
7
8${THIS_SH} -c 'exec 8>&1; echo fd 8 >&8' 8>u
9cat u
10rm -f u
11
12exec 10>u
13exec 10>&1; echo 'fd 10' >&10
14cat u
15rm -f u
16exec 10>&-
17
18exec 8>u
19exec 8>&1; echo 'fd 8' >&8
20cat u
21rm -f u
22exec 8>&-
23
24rm -f infile
25cat > infile <<EOF
261
272
283
294
30EOF
31
32exec 7<&0
33exec 10<infile
34exec 0<&10; cat <&10
35exec 0<&7
36exec 7<&-
37
38exec 7<&0
39exec 8<infile
40exec 0<&8 ; cat <&8
41exec 0<&7
42exec 7<&-
43
44exec 7<&0
45exec 0</dev/null
46exec 10<infile
47exec 10<&0; cat <&10
48exec 0<&7
49exec 7<&-
50
51exec 7<&0
52exec 0</dev/null
53exec 8<infile
54exec 8<&0; cat <&8
55exec 0<&7
56exec 7<&-
57
58rm -f infile
59exit 0