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

[[ -n $v ]] versus (( $#v > 0 ))



What does the (imaginary) Zsh Scripting Style Guide say about

if [[ -n $v ]]; then
  ...
fi

versus

if (( $#v > 0 )); then
  ...
fi

?

Is it simply legacy that causes people to write [[ -n $v ]] over (( $#v > 0 ))?

Which version is "faster"?



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