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