Date: Tue, 22 Jun 2010 07:20:00 +0800 From: Aiza <aiza21@comclark.com> To: =?ISO-8859-1?Q?Samuel_Mart=EDn_Moro?= <faust64@gmail.com> Cc: "questions@freebsd.org" <questions@freebsd.org> Subject: Re: .sh for loop Message-ID: <4C1FF3A0.7010902@comclark.com> In-Reply-To: <AANLkTikKLcQMazEw3NzmYZgLlwVa016lXqwTTFExX4BH@mail.gmail.com> References: <4C1F4B4C.2000006@comclark.com> <AANLkTinB6FkugAD0GXlF3t-n5dbX39nstbxSxlCxiHje@mail.gmail.com> <4C1F6746.4050400@comclark.com> <AANLkTikKLcQMazEw3NzmYZgLlwVa016lXqwTTFExX4BH@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Samuel Martín Moro wrote: > for name in "${path}/${group}"* > do > path=/dev > group=ttypqfr > for name in "${path}/${group}"* > do > test "$name" = "${path}/${group}*" && continue > [ -z "${found_list}" ] && found_list="${name}" || > found_list="${found_list} ${name}" > done > echo "found list: $found_list" > Thank You Samuel. Using the 'test' command solved my problem. I had not known about the 'test' command. You have taught me something new.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C1FF3A0.7010902>