Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jun 2010 02:03:08 +0100
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: .sh for loop
Message-ID:  <20100622020308.5615337c@gumby.homeunix.com>
In-Reply-To: <4C1FF3A0.7010902@comclark.com>
References:  <4C1F4B4C.2000006@comclark.com> <AANLkTinB6FkugAD0GXlF3t-n5dbX39nstbxSxlCxiHje@mail.gmail.com> <4C1F6746.4050400@comclark.com> <AANLkTikKLcQMazEw3NzmYZgLlwVa016lXqwTTFExX4BH@mail.gmail.com> <4C1FF3A0.7010902@comclark.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 22 Jun 2010 07:20:00 +0800
Aiza <aiza21@comclark.com> wrote:


> >    test "$name" = "${path}/${group}*" && continue
> >    [ -z "${found_list}" ] && found_list="${name}" ||


> I had not known about the 'test' command.
> You have taught me something new.

In case you're not aware, [ -z "${found_list}" ] is also using
test. /bin/test and /bin/[ are hard-linked. So the following are the
same:
 
test "$name" = "${path}/${group}*" && continue

[ "$name" = "${path}/${group}*" ] && continue



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100622020308.5615337c>