OILS / spec / bin / builtins-exec-here-doc-helper.sh View on Github | oilshell.org

19 lines, 6 significant
1# Demo of redirecting from a here doc.
2#
3# All shells support this when passed a filename. But they all mess up
4# when passed this code on stdin, because they simultaneously try to read from
5# stdin!
6
7exec <<EOF
8one
9two
10three
11EOF
12
13read x
14echo "x=$x"
15read y
16echo "y=$y"
17#read z
18#echo "z=$z"
19echo DONE