* [9fans] acme: dropping files matching a pattern
@ 2013-04-08 12:45 erik quanstrom
0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2013-04-08 12:45 UTC (permalink / raw)
To: 9fans
actually this is a special case that can be done from within
acme (or sam).
D is part of the edit language (this is impossible if the
command isn't part of the edit sublanguage), so all one
needs is
X:filepattern:D
that's it.
unfortunately, there are things that can't be done this way,
so here's a general loop that sneaks outside acme to
generate commands:
#!/bin/rc
rfork e
N=' +([0-9]+)'
~ $#acmecmd 0 && acmecmd=delete
for(i)
< /mnt/acme/index sed -n 's:^'$N$N$N$N$N' +([^ ].*'$i'[^ ]+).*:echo '$acmecmd' > /mnt/acme\1/ctl:p'
- erik
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-08 12:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-08 12:45 [9fans] acme: dropping files matching a pattern erik quanstrom
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).