9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] How to do this with [acme | sam | sed ] ?
@ 2013-01-11 11:19 Peter A. Cejchan
  2013-01-11 11:44 ` Rudolf Sykora
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Peter A. Cejchan @ 2013-01-11 11:19 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

## How to do this with [acme | sam | sed ]  ?
# compound commands
# remove outermost pair of braces:  abcd(x+(y-z))efgh  --> abcdx+(y-z)efgh
         [ no idea :-( ]
# remove semicolon before // comments:  xyz;[tab][space]*//  --> xyz
         [ Edit /;[ 	]*\/\// Edit s/;//	# find and remove semicolon
before // comments ]
# prefix to postfix operator: ++i --> i++
         [ Edit s/\+\+[a-zA-Z]+[0-9a-zA-Z]*/&++/ Edit s/\+\+/d]

thanks,
++pac



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-01-11 15:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-11 11:19 [9fans] How to do this with [acme | sam | sed ] ? Peter A. Cejchan
2013-01-11 11:44 ` Rudolf Sykora
2013-01-11 12:24   ` Peter A. Cejchan
2013-01-11 12:27     ` dexen deVries
2013-01-11 12:38       ` Bence Fábián
2013-01-11 14:24   ` erik quanstrom
2013-01-11 15:16     ` Rudolf Sykora
2013-01-11 11:46 ` Bence Fábián
2013-01-11 12:07   ` Peter A. Cejchan
2013-01-11 12:09 ` Nicolas Bercher
2013-01-11 13:10   ` Peter A. Cejchan
2013-01-11 13:24     ` Nicolas Bercher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).