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 11981
- From: Clint Adams <clint@xxxxxxx>
- To: Kenneth Lareau <elessar@xxxxxxxxxxx>
- Subject: Re: Looking for devious one or two liner solutions to a problem
- Date: Wed, 10 Oct 2007 22:45:30 -0400
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20071010163733.7875cee3.elessar@xxxxxxxxxxx>
- Mail-followup-to: Kenneth Lareau <elessar@xxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20071010163733.7875cee3.elessar@xxxxxxxxxxx>
On Wed, Oct 10, 2007 at 04:37:33PM -0700, Kenneth Lareau wrote:
> version of this function that would fit on a single 80 character line (or perhaps
I think this does it in 80 exactly.
f(){j=(${(s:.:)1});((j[$2+1]++));for ((i=$2+2;i<5;i++)) j[i]=0;print ${(j:.:)j}}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author