mirror of https://github.com/n-hys/bash.git
107 lines
1.6 KiB
Plaintext
107 lines
1.6 KiB
Plaintext
a
|
|
b
|
|
c
|
|
a
|
|
$PS4
|
|
|
|
|
|
|
|
there
|
|
one - alpha
|
|
two - beta
|
|
three - gamma
|
|
hi\
|
|
there$a
|
|
stuff
|
|
hi\
|
|
there
|
|
EO\
|
|
F
|
|
hi
|
|
hi
|
|
tab 1
|
|
tab 2
|
|
tab 3
|
|
abc
|
|
def ghi
|
|
jkl mno
|
|
fff is a function
|
|
fff ()
|
|
{
|
|
ed ${TMPDIR}/foo <<ENDOFINPUT > /dev/null
|
|
/^name/d
|
|
w
|
|
q
|
|
ENDOFINPUT
|
|
|
|
aa=1
|
|
}
|
|
fff is a function
|
|
fff ()
|
|
{
|
|
ed ${TMPDIR}/foo <<ENDOFINPUT > /dev/null
|
|
/^name/d
|
|
w
|
|
q
|
|
ENDOFINPUT
|
|
|
|
aa=1
|
|
}
|
|
foo is a function
|
|
foo ()
|
|
{
|
|
echo;
|
|
cat <<END
|
|
bar
|
|
END
|
|
|
|
cat <<EOF
|
|
qux
|
|
EOF
|
|
|
|
}
|
|
|
|
bar
|
|
qux
|
|
|
|
bar
|
|
qux
|
|
abc def geh
|
|
./heredoc3.sub: line 23: warning: here-document at line 21 delimited by end-of-file (wanted `EOF')
|
|
= here is the text =
|
|
./heredoc3.sub: line 29: warning: here-document at line 27 delimited by end-of-file (wanted `EOF')
|
|
this paren ) is not a problem
|
|
./heredoc3.sub: line 35: warning: here-document at line 33 delimited by end-of-file (wanted `EOF')
|
|
these balanced parens ( ) are not a problem
|
|
./heredoc3.sub: line 41: warning: here-document at line 39 delimited by end-of-file (wanted `EOF')
|
|
quoted balanced parens \( ) are not a problem either
|
|
more text in a subshell
|
|
some more text in a different subshell
|
|
end
|
|
hello
|
|
hello
|
|
ENDEND
|
|
end ENDEND
|
|
hello
|
|
end hello
|
|
end x*x
|
|
helloEND
|
|
end helloEND
|
|
hello
|
|
\END
|
|
end hello<NL>\END
|
|
./heredoc3.sub: line 98: warning: here-document at line 96 delimited by end-of-file (wanted `EOF')
|
|
./heredoc3.sub: line 99: syntax error: unexpected end of file
|
|
heredoc1
|
|
EOF
|
|
Ok:0
|
|
argv[1] = <onetwo>
|
|
argv[2] = <threefour>
|
|
argv[1] = <two>
|
|
argv[2] = <threefi>
|
|
argv[3] = <ve>
|
|
comsub here-string
|
|
./heredoc.tests: line 149: warning: here-document at line 147 delimited by end-of-file (wanted `EOF')
|
|
hi
|
|
there
|