From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1IlNRU-0006GS-AE for garchives@archives.gentoo.org; Fri, 26 Oct 2007 11:33:32 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l9QBWYrL019537; Fri, 26 Oct 2007 11:32:34 GMT Received: from mail.marples.name (rsm.demon.co.uk [80.177.111.50]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id l9QBUksX017249 for ; Fri, 26 Oct 2007 11:30:47 GMT Received: from [10.73.1.31] (uberlaptop.marples.name [10.73.1.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.marples.name (Postfix) with ESMTP id 62321190103 for ; Fri, 26 Oct 2007 12:30:46 +0100 (BST) Subject: Re: [gentoo-dev] Opinions Wanted - Arrays again :) From: Roy Marples To: gentoo-dev@lists.gentoo.org In-Reply-To: <1193329122.4245.25.camel@uberlaptop.marples.name> References: <1193326831.4245.16.camel@uberlaptop.marples.name> <4720BE02.6080409@gentoo.org> <1193329122.4245.25.camel@uberlaptop.marples.name> Content-Type: text/plain Organization: Gentoo Date: Fri, 26 Oct 2007 12:30:45 +0100 Message-Id: <1193398245.4312.24.camel@uberlaptop.marples.name> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Archives-Salt: d2f3ddb7-38b4-47b9-8a5b-569e5f37cfae X-Archives-Hash: cf48be9f60fb5281fc809bbc28e8392e On Thu, 2007-10-25 at 17:18 +0100, Roy Marples wrote: > # How baselayout-2 may handle arrays based on this discussion > IFS=" > " > for x in $(_get_array array); do > unset IFS > echo "$x" > done Also, if we didn't need to actually set any variables outside the loop we could also then write this _get_array array | while read x; do echo "$x" done Thanks Roy -- gentoo-dev@gentoo.org mailing list