Jari Aalto | ccc6cda | 1996-12-23 17:02:34 +0000 | [diff] [blame] | 1 | there |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 2 | one - alpha |
| 3 | two - beta |
| 4 | three - gamma |
Jari Aalto | ccc6cda | 1996-12-23 17:02:34 +0000 | [diff] [blame] | 5 | hi\ |
| 6 | there$a |
| 7 | stuff |
| 8 | hi\ |
| 9 | there |
| 10 | EO\ |
| 11 | F |
| 12 | hi |
| 13 | hi |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 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 | { |
Jari Aalto | 0628567 | 2006-10-10 14:15:34 +0000 | [diff] [blame] | 23 | ed /tmp/foo > /dev/null <<ENDOFINPUT |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 24 | /^name/d |
| 25 | w |
| 26 | q |
| 27 | ENDOFINPUT |
| 28 | |
| 29 | aa=1 |
| 30 | } |
| 31 | fff is a function |
| 32 | fff () |
| 33 | { |
Jari Aalto | 0628567 | 2006-10-10 14:15:34 +0000 | [diff] [blame] | 34 | ed /tmp/foo > /dev/null <<ENDOFINPUT |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 35 | /^name/d |
| 36 | w |
| 37 | q |
| 38 | ENDOFINPUT |
| 39 | |
| 40 | aa=1 |
| 41 | } |
Jari Aalto | 17345e5 | 2009-02-19 22:21:29 +0000 | [diff] [blame] | 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 |
Chet Ramey | ac50fba | 2014-02-26 09:36:43 -0500 | [diff] [blame] | 61 | abc def geh |
| 62 | ./heredoc3.sub: line 6: warning: here-document at line 4 delimited by end-of-file (wanted `EOF') |
| 63 | = here is the text = |
| 64 | ./heredoc3.sub: line 12: warning: here-document at line 10 delimited by end-of-file (wanted `EOF') |
| 65 | this paren ) is not a problem |
| 66 | ./heredoc3.sub: line 18: warning: here-document at line 16 delimited by end-of-file (wanted `EOF') |
| 67 | these balanced parens ( ) are not a problem |
| 68 | ./heredoc3.sub: line 24: warning: here-document at line 22 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 | x star x |
| 80 | end x*x |
| 81 | helloEND |
| 82 | end helloEND |
| 83 | hello |
| 84 | \END |
| 85 | end hello<NL>\END |
| 86 | ./heredoc3.sub: line 74: warning: here-document at line 72 delimited by end-of-file (wanted `EOF') |
| 87 | ./heredoc3.sub: line 75: syntax error: unexpected end of file |
Chet Ramey | 0001803 | 2011-11-21 20:51:19 -0500 | [diff] [blame] | 88 | comsub here-string |
Chet Ramey | ac50fba | 2014-02-26 09:36:43 -0500 | [diff] [blame] | 89 | ./heredoc.tests: line 105: warning: here-document at line 103 delimited by end-of-file (wanted `EOF') |
Jari Aalto | ccc6cda | 1996-12-23 17:02:34 +0000 | [diff] [blame] | 90 | hi |
| 91 | there |