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, 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