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

Re: var expansion in glob pattern?



* Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> [2002-03-23 19:54]:
> j=0
> for i in 1 2 3 4 5 10 15 20 25 30 35 40 35 40 45 50; do
>   print ${(l:3:)i}k : "$[${#${(f)$(print -l x *(N.Lk-${i}Lk+${j}))}}-1]"
>   ((j=i-1))
> done
> print Rest : "$[${#${(f)$(print -l x *(N.Lk+${j}))}}-1]"

(Bart's print) (not in output)
    1k : 0     .
    2k : 202   .**
    3k : 431   .****
    4k : 656   .******.
    5k : 717   .*******
   10k : 1316  .*************
   15k : 551   .*****.
   20k : 306   .***
   25k : 177   .*.
   30k : 128   .*
   35k : 102   .*
   40k : 75    ..
   35k : 0     .
   40k : 75    ..
   45k : 46    ..
   50k : 41    .
  Rest : 502   .*****

thanks, Bart! :-)

Sven  [reading up on "print"
       and glob patterns]



Messages sorted by: Reverse Date, Date, Thread, Author