From: malte@techfak.uni-bielefeld.de
To: rc@hawkwind.utcs.toronto.edu
Subject: Re: set subtract
Date: Wed, 4 Nov 1992 09:25:33 -0500 [thread overview]
Message-ID: <9211041425.AA18713@dahlie.techfak.uni-bielefeld.de> (raw)
In-Reply-To: Mail from 'rsalz@osf.org' dated: Wed, 4 Nov 1992 09:12:36 -0500
Easy; the following just uses built-ins. Note that it implements
the example (first arg is a pattern, not a list of patterns); I don't
believe the synopsis can be done.
fn index { pat=() i=() result=() count=() {
pat=$1
shift || { echo 'Usage error' >[1=2] ; return 1 }
for (i) {
count=(a $count)
eval ~ $i $pat && result=($result $#count)
}
echo $result
} }
Fine, this is similar to what I do now. Why a built in command ?
Imagine $pat has a value of '$something'. This will break it.
Malte
next reply other threads:[~1992-11-04 14:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1992-11-04 14:25 malte [this message]
-- strict thread matches above, loose matches on Subject: below --
1992-11-04 14:12 rsalz
[not found] <cks@hawkwind.utcs.toronto.edu>
1992-11-04 12:45 ` malte
1992-11-03 23:44 Byron Rakitzis
1992-11-04 0:42 ` 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=9211041425.AA18713@dahlie.techfak.uni-bielefeld.de \
--to=malte@techfak.uni-bielefeld.de \
--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).