Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Looking for devious one or two liner solutions to a problem
- X-seq: zsh-users 11982
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Looking for devious one or two liner solutions to a problem
- Date: Thu, 11 Oct 2007 16:01:11 +1300 (NZDT)
- In-reply-to: <20071011024530.GA19838@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
- References: <20071010163733.7875cee3.elessar@xxxxxxxxxxx> <20071011024530.GA19838@xxxxxxxxxxx>
On Wed, 10 Oct 2007, Clint Adams wrote:
f(){j=(${(s:.:)1});((j[$2+1]++));for ((i=$2+2;i<5;i++)) j[i]=0;print ${(j:.:)j}}
==============
looks like you've got the job ;)
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"The more laws, the less justice."
-- Marcus Tullius Cicero De Officiis
Messages sorted by:
Reverse Date,
Date,
Thread,
Author