Results 1 to 1 of 1
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.
...
- 06-13-2010 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 43
bash here doc w/ parameter substitution
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


Reply With Quote