I am trying to extract all text which is present before the first occurrence of sign “/>” using csh script.
I tried the following code
set product3 = echo "$product1" | sed 's/\/>$//'
bt the output I am getting is the string exist before last occurrence of “/>”
please help !!
You’re
sedreplacement is off by just a bit:using the
.*will cause sed to greedily consume all the characters from the first match until the end of the string, which I think is what you want.