Unix regular expression question grep, sed
gregg.g.wonderly
gregg at cbnewsc.ATT.COM
Thu Jun 8 00:54:02 AEST 1989
>From article <9429 at alice.UUCP>, by ark at alice.UUCP (Andrew Koenig):
> How about this?
>
> sed '/\/\*name\*\//,//d' <inputfile >outputfile
Not to whine too loudly, but is it really necessary to make this look
like magic? Just because you know that the RE routines take a NULL RE
to mean 'use the last one specified', doesn't mean that such a
'feature' should always be exploited does it?
Doesn't
sed '/\/\*name\*\//,/\/\*name\*\//d' <inputfile >outputfile
seem to be a slightly more educational solution to someone who asked
for a solution, not knowing the answer?
Not to pick on Andrew, I just hate incomplete examples without explanations
for non-obvious things.
--
-----
gregg.g.wonderly at att.com (AT&T bell laboratories)
More information about the Comp.unix.questions
mailing list