Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Mar 1999 10:29:19 +1000
From:      Greg Black <gjb@comkey.com.au>
To:        Mark Ovens <marko@uk.radan.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: sed and newlines 
Message-ID:  <19990319002919.15838.qmail@alpha.comkey.com.au>
In-Reply-To: <36F0FFB4.9EFDDF15@uk.radan.com>  of Thu, 18 Mar 1999 13:29:24 GMT
References:  <199903172339.SAA06674@cc942873-a.ewndsr1.nj.home.com> <19990318122811.11031.qmail@alpha.comkey.com.au> <36F0FFB4.9EFDDF15@uk.radan.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >  the man page, which is one of the great masterpieces of obscurity[1].
> 
> [....]
> 
> > [1] How many people understood what they could do with "hold"
> >     spaces and "pattern" spaces and how to shuffle stuff between
> >     them on their first reading of the sed man page?  And how
> >     many then found they didn't understand it after all when
> >     they tried to make it work?
> 
> Which probably explains why O'Reilly make a profit from a 400+ page
> book covering only sed and awk.

I've never looked at that book, partly because I knew everything
I wanted to know about sed and awk before it appeared and partly
because I find it easy to teach the use of both those programs
without additional material.

On the other hand, the lex and yacc pair *do* need extra help
for the teacher.  The first edition of the ORA book on lex and
yacc was close to useless; the second edition, with lots of new
material and much of the old stuff re-written, is a vast step
forward (although it still falls well short of what I'd like it
to be for teaching purposes).

I mention lex and yacc because they are the natural next step
when you can't do what you want with sed and awk.  Sometimes, of
course, the best next step is to look at the problem differently
and switch to a more modern tool such as Python.  (Python can't
even come close to replacing lex and yacc for the serious work,
of course; but it can manage the simple kind of task we've been
looking at here with ease.)

-- 
Greg Black <gjb@acm.org>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990319002919.15838.qmail>