]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/heredoc.right
bash-5.1 distribution sources and documentation
[thirdparty/bash.git] / tests / heredoc.right
1 a
2 b
3 c
4 a
5 $PS4
6
7
8
9 there
10 one - alpha
11 two - beta
12 three - gamma
13 hi\
14 there$a
15 stuff
16 hi\
17 there
18 EO\
19 F
20 hi
21 hi
22 tab 1
23 tab 2
24 tab 3
25 abc
26 def ghi
27 jkl mno
28 fff is a function
29 fff ()
30 {
31 ed ${TMPDIR}/foo <<ENDOFINPUT > /dev/null
32 /^name/d
33 w
34 q
35 ENDOFINPUT
36
37 aa=1
38 }
39 fff is a function
40 fff ()
41 {
42 ed ${TMPDIR}/foo <<ENDOFINPUT > /dev/null
43 /^name/d
44 w
45 q
46 ENDOFINPUT
47
48 aa=1
49 }
50 foo is a function
51 foo ()
52 {
53 echo;
54 cat <<END
55 bar
56 END
57
58 cat <<EOF
59 qux
60 EOF
61
62 }
63
64 bar
65 qux
66
67 bar
68 qux
69 abc def geh
70 ./heredoc3.sub: line 23: warning: here-document at line 21 delimited by end-of-file (wanted `EOF')
71 = here is the text =
72 ./heredoc3.sub: line 29: warning: here-document at line 27 delimited by end-of-file (wanted `EOF')
73 this paren ) is not a problem
74 ./heredoc3.sub: line 35: warning: here-document at line 33 delimited by end-of-file (wanted `EOF')
75 these balanced parens ( ) are not a problem
76 ./heredoc3.sub: line 41: warning: here-document at line 39 delimited by end-of-file (wanted `EOF')
77 quoted balanced parens \( ) are not a problem either
78 more text in a subshell
79 some more text in a different subshell
80 end
81 hello
82 hello
83 ENDEND
84 end ENDEND
85 hello
86 end hello
87 end x*x
88 helloEND
89 end helloEND
90 hello
91 \END
92 end hello<NL>\END
93 ./heredoc3.sub: line 98: warning: here-document at line 96 delimited by end-of-file (wanted `EOF')
94 ./heredoc3.sub: line 99: syntax error: unexpected end of file
95 heredoc1
96 EOF
97 Ok:0
98 argv[1] = <onetwo>
99 argv[2] = <threefour>
100 argv[1] = <two>
101 argv[2] = <threefi>
102 argv[3] = <ve>
103 comsub here-string
104 ./heredoc.tests: line 149: warning: here-document at line 147 delimited by end-of-file (wanted `EOF')
105 hi
106 there