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