On 07:49 Thu 04 Oct , Roy Marples wrote:
> On Thu, 2007-10-04 at 05:03 +0100, Steve Long wrote:
> > Donnie Berkholz wrote:
> >
> > > spec=$(echo ${CHOST} | cut -d- -f3)
> > >
> > You can do this without resort to an external process:
> > IFS=-
> > read _ _ spec _ <<< "$CHOST"
> > unset IFS
> > - or you can do:
> > IFS=-
> > arr=($CHOST)
> > unset IFS
> > spec=${arr[2]}
>
> See, another use of bash arrays just because you can?
Sure. If there's no requirement to stick to portable sh, why shouldn't
we use whatever features of bash we like?
Thanks,
Donnie
--
[EMAIL PROTECTED] mailing list