If rather than doing the substitution I just put the string in the here doc this script works.
However, if I do the substitution, as the script reads, nothing happens.
Does someone know how to fix this?
------------------------------------------------------------------------------------------------------------------------
function f1 () {
str=".s/quick/xyzzy/^M"

ex f2 <<\eos
2
${str}
wq
eos
echo ${str}
}
---------------------------------------------------------------------------------------------------------------------------
f2:
the
quick
brown
fox
jumped
over
the
lazy
dog