Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[[ -n $v ]] versus (( $#v > 0 ))
- X-seq: zsh-users 12238
- From: "Nikolai Weibull" <now@xxxxxxxx>
- To: "ZSH Users" <zsh-users@xxxxxxxxxx>
- Subject: [[ -n $v ]] versus (( $#v > 0 ))
- Date: Tue, 20 Nov 2007 13:45:07 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; bh=qyoIeN76TQTzXX2Tjlv2v9j/BUqJ9hM/oSTz7Otrk70=; b=U4TOdqzPk0Q3yQbp3nOWAU5dq074W6M4tPAsDo4cBQjdOMsFikGGCvTjFpapsUgOaPPy9BhOlrh1euYO/syFz3E99i/bxT7/LNe32HGEsrM16m+YxMSBRrP05x7IOWilmOoOmInu6jRXMYpKZaQCu+pNuMt+SYAiodfYSGDSYpM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=TtDmaUtQJMaMkGaMVfjAODBfMrUyh9PtCQqNlt5El1kMMZmRl73sGh5rlwkU5y5KgPuih0+ZP4/UTfWlFvayaUudR9KpkNiKNKEpOz/1gUYHcMzhCOF64WTDSGuIR3sEn62n0vMDBxUuxJAov5AVi3CPu/popOM3rVmkHE5OnaU=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Sender: nikolai.weibull@xxxxxxxxx
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