[ILUG] sed is annoying me muchly
Stephen Shirley
diamond at skynet.ie
Thu Oct 31 15:56:08 GMT 2002
Hey,
Quick sed question: Why in the blue blazes is this:
echo 'hello }}' | sed 's/\([^}]*\)}/\1/'
printing out this:
'hello }'
instead of this:
'hello '
? It's driving me nuts.
sed 's/\([^}]*\)//'
gives
'}}'
leaving me _very_ confused. I reckon it's a bug in sed, cause
sed 's/\([^}]*\).*/\1/'
_does_ work. Hmph.
Steve
--
"Oh look, it's the Pigeon of Love."
More information about the ILUG
mailing list