[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Is [[ $x = $y ]] faster than [ "$x" = "$y" ]?
From: |
Pierre Gaston |
Subject: |
Re: [Help-bash] Is [[ $x = $y ]] faster than [ "$x" = "$y" ]? |
Date: |
Sun, 30 Jul 2017 07:55:29 +0300 |
On Sun, Jul 30, 2017 at 12:19 AM, Peng Yu <address@hidden> wrote:
> Hi,
>
> I have the following test case. Can I make the conclusion that [[ $x =
> $y ]] is faster than [ "$x" = "$y" ] in general? Thanks.
>
>
> you can, however since [[ does pattern matching, it's perhaps better to
compare with [[ $x = "$y" ]]