Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Looking for devious one or two liner solutions to a problem



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