Hi,
To follow onto the above question. How do I get away with using a variable in sed that contains a slash?
Eg
var1="ethernet0/0"
sed '1,$s/'"$var1/TEST/g"
This gives me an output of :
sed: command garbled: 1,$s/ethernet0/0/TEST/g
My aim is to used sed to give me just the paragraph between var1 and whatever like so:
sed -n '/$var1/,/whatever/p'
Any ideas, or perhaps a better way to perform the task?
Thanks .. TJ