Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/regress/sys/net
On Thu, Mar 03, 2011 at 08:09:49AM +0000, David Laight wrote:
> > +awk < $1 '
> > + state == 0 && /^ether_aton_r/ { print prev; state = 1; }
> > + state == 1 { print; }
> > + state == 1 && /^}$/ { state = 2; }
> > + { prev = $0; }
> > +' >> $2
>
> Looks like that would be even simpler in sed :-)
It's not - at best you'd have to branch, sed isn't stateful enough.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index