From owner-freebsd-questions@FreeBSD.ORG Mon Jun 21 14:49:40 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A45EC1065670 for ; Mon, 21 Jun 2010 14:49:40 +0000 (UTC) (envelope-from faust64@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2F97D8FC13 for ; Mon, 21 Jun 2010 14:49:39 +0000 (UTC) Received: by bwz8 with SMTP id 8so1603016bwz.13 for ; Mon, 21 Jun 2010 07:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=JpmbYYJA3837hYT17JJMRDA/tH+aTyaa0yV7JtIw3oA=; b=WJndSVIhrbwvKa7fnCH82tN1QBBzRd0ojawXyPNVl1pWeC0EKrBa9zNjKUtFogYsAb 0WTDWt+FFUHWRrK+cbO2hAQ+3fNv8Ulh6cK7le5wwoHyeLqxVhNJCKw01enXE68XYBhD VTKG7rv7eDu5N+4OiAYnSX2tlkJdP4S7wLR3E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=S5oB2W+CiMxQW5Tlg1Byd9mbT2pwzcVCkoUV3Qga/40l/jaIWMDBWhKBGgbfUrAH3/ KWQ1YnKrKzNOSD+ODX5BmQTWE13LEmkGn29BZtSLNM+V7b6kqfDyoIHXdFpyRXZdwMZQ JomR9yxJOnoXCKaUiQbzj2o/5Hm4wLVfqgGxI= Received: by 10.204.162.129 with SMTP id v1mr3111574bkx.8.1277131775162; Mon, 21 Jun 2010 07:49:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.50.202 with HTTP; Mon, 21 Jun 2010 07:49:05 -0700 (PDT) In-Reply-To: <4C1F6746.4050400@comclark.com> References: <4C1F4B4C.2000006@comclark.com> <4C1F6746.4050400@comclark.com> From: =?ISO-8859-1?Q?Samuel_Mart=EDn_Moro?= Date: Mon, 21 Jun 2010 16:49:05 +0200 Message-ID: To: Aiza Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "questions@freebsd.org" Subject: Re: .sh for loop X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2010 14:49:40 -0000 for name in "${path}/${group}"* do path=3D/dev group=3Dttypqfr for name in "${path}/${group}"* do test "$name" =3D "${path}/${group}*" && continue [ -z "${found_list}" ] && found_list=3D"${name}" || found_list=3D"${found_list} ${name}" done echo "found list: $found_list" Samuel Mart=EDn Moro {EPITECH.} tek4 CamTrace S.A.S (+033) 1 41 38 37 60 1 All=E9e de la Venelle 92150 Suresnes FRANCE "Nobody wants to say how this works. Maybe nobody knows ..." Xorg.conf(5) On Mon, Jun 21, 2010 at 3:21 PM, Aiza wrote: > path=3D/dev >> group=3Dtty >> for name in "${path}/${group}"* >> do >> [ -z "${found_list}" ] && found_list=3D"${name}" || >> found_list=3D"${found_list} ${name}" >> done >> echo "found list: $found_list" > >