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

Re: trapped in bash



On 12/17/2016 03:16 PM, Jim wrote:


_count=${#${(f)_variable}}

This will remove the need for the variable _array. One caution, if your
not already aware, (f) removes blank lines, so they won't show up in
the count.

Hope this helps,

Jim

Thanks Jim, my experiments failed 'cuz I insisted on including the parenthesis, but since no array is created, no parenthesis are needed. Clear in hindsight.



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