Gentoo Archives: gentoo-dev

From: Donnie Berkholz <dberkholz@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in x11-libs/qt: ChangeLog qt-4.3.2.ebuild
Date: Thu, 04 Oct 2007 07:44:46
Message-Id: 20071004073249.GZ15143@supernova
In Reply to: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in x11-libs/qt: ChangeLog qt-4.3.2.ebuild by Roy Marples
1 On 07:49 Thu 04 Oct , Roy Marples wrote:
2 > On Thu, 2007-10-04 at 05:03 +0100, Steve Long wrote:
3 > > Donnie Berkholz wrote:
4 > >
5 > > > spec=$(echo ${CHOST} | cut -d- -f3)
6 > > >
7 > > You can do this without resort to an external process:
8 > > IFS=-
9 > > read _ _ spec _ <<< "$CHOST"
10 > > unset IFS
11 > > - or you can do:
12 > > IFS=-
13 > > arr=($CHOST)
14 > > unset IFS
15 > > spec=${arr[2]}
16 >
17 > See, another use of bash arrays just because you can?
18
19 Sure. If there's no requirement to stick to portable sh, why shouldn't
20 we use whatever features of bash we like?
21
22 Thanks,
23 Donnie
24 --
25 gentoo-dev@g.o mailing list

Replies