]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/redir.right
Imported from ../bash-2.05b.tar.gz.
[thirdparty/bash.git] / tests / redir.right
1 abc
2 ./redir.tests: line 13: /tmp/redir-test: cannot overwrite existing file
3 abc
4 def
5 def
6 ./redir.tests: line 29: $z: ambiguous redirect
7 Point 1
8 Point 2
9 to a
10 to b
11 Point 3
12 to a
13 to a
14 to b
15 to b
16 Point 4
17 to c
18 Point 5
19 this is redir1.sub
20 this is redir2.sub
21 read line1 "ab"
22 read line2 "root"
23 read line3 "cd"
24 read line4 "daemon"
25 from stdin: aa
26 to stdout
27 ./redir4.sub: line 32: $fd: ambiguous redirect
28 ./redir4.sub: line 33: $fd: ambiguous redirect
29 /tmp/err-and-out:
30 to stdout
31 to stderr
32 /tmp/err-and-out:
33 to stdout
34 to stderr
35 0 -- 3 0
36 0 -- 4 0
37 ab
38 cd
39 ef
40 gh
41 ij
42 kl
43 0
44 ab
45 cd
46 cd
47 ./redir.tests: line 152: redir1.*: No such file or directory
48 # tests of ksh93-like dup-and-close redirection operators
49 exec 9<$0
50
51 f()
52 {
53 exec 5<$0
54
55 exec 0<&5-
56
57 while read line; do
58 echo "$line"
59 done
60 }
61
62 f
63
64 typeset -f f
65
66 # make sure it was closed
67 read -u 5 foo
68 echo after read
69
70 exec 5<&0
71
72 exec <&-
73
74 read abcde
75
76 exec 0<&9-
77 read line
78 echo $line
79 f ()
80 {
81 exec 5<$0;
82 exec 0<&5-;
83 while read line; do
84 echo "$line";
85 done
86 }
87 ./redir5.sub: line 20: read: 5: invalid file descriptor: Bad file descriptor
88 after read
89 ./redir5.sub: line 27: read: read error: 0: Bad file descriptor
90 # tests of ksh93-like dup-and-close redirection operators