rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: rsalz@osf.org
To: cks@hawkwind.utcs.toronto.edu, culliton@srg.srg.af.mil,
	haahr@mv.us.adobe.com
Cc: es@hawkwind.utcs.toronto.edu, rc@hawkwind.utcs.toronto.edu
Subject: Re: a feature I wish rc had
Date: Tue, 3 Nov 1992 14:53:16 -0500	[thread overview]
Message-ID: <9211031953.AA09196@earth.osf.org> (raw)

>Anybody feel like producing an all builtin function for this? 
>Something like "remove pattern list" or "remove index list".  It
>shouldn't be too hard.
Trivial:
fn remove { pat=() i=() list=() {
    pat=$1
    shift || { echo 'Usage erorr' >[1=2] ; return 1; }
    for (i) eval ~ $i $pat || list=($list $i)
    echo $list
} }
remove '*.c' foo.c bar baz.c

path=`{remove /usr/share/bin $path}


             reply	other threads:[~1992-11-03 19:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-11-03 19:53 rsalz [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-11-03 22:32 Paul Haahr
1992-11-03 22:43 ` Mark-Jason Dominus
1992-11-03 16:10 Tom Culliton x2278
1992-11-02 22:36 Paul Haahr
1992-11-04  1:26 ` Scott Schwartz
1992-11-02 22:27 Chris Siebenmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9211031953.AA09196@earth.osf.org \
    --to=rsalz@osf.org \
    --cc=cks@hawkwind.utcs.toronto.edu \
    --cc=culliton@srg.srg.af.mil \
    --cc=es@hawkwind.utcs.toronto.edu \
    --cc=haahr@mv.us.adobe.com \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).