On Nov 30, 2009, at 21:20 , Tom Limoncelli wrote:
This sounds like a job of sed but my sed fu is weak.

Not really; sed can be abused into that kind of conditionality, but it's not simple. Redefine the spec so that an existing block is deleted but the new block goes at the end always, and you have a sed- type job.

This can, on the other hand, be fairly easily done with awk. It's still not a one-liner, though.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Discuss mailing list
Discuss@lopsa.org
http://lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to