Re: [PATCH 04/48] Use [[ ]] instead of [ ] for conditional checking when running in bash.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Am 30.06.2010 23:47, schrieb Victor Lowther:
> It is worth 10 - 30% speedup whenever you want to compare something.

Where do you get this from? I always used [ ], and I found it
sufficient. Why is [[ ]] faster?

> -if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then
> +if [[ $USECOLOR = YES || $USECOLOR = yes ]]; then

Why do you get rid of the quoting here? Quoting is nice.

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux