On Fri, Feb 09, 2007 at 09:29:04AM +0000, Roy Marples wrote:
> On Fri, 09 Feb 2007 01:03:04 -0800
> Donnie Berkholz <[EMAIL PROTECTED]> wrote:
> 
> > Jakub Moc wrote:
> > > Mike Frysinger napsal(a):
> > >> On Thursday 08 February 2007, Roy Marples wrote:
> > >>> The actual scripts themselves can be re-worked if they need to be
> > >>> - this problem only when the arrays are used in config files.
> > >> i guess my point was i think we really need to be consistent
> > >> here ... either arrays are OK for init.d scripts or they're not OK
> > >>
> > >> did you get a chance to see how hard it would be to integrate the
> > >> bash array code ?
> > > 
> > > sys-apps/855resolution and sys-apps/915resolution use arrays in
> > > config files, and there's not much way around it ATM if you want to
> > > replace multiple BIOS modes...
> > > 
> > > <snip>
> > > # to replace more than one mode do something like this
> > > #replace=(
> > > # "4d 1280 768 24"
> > > # "5c 1400 1050 16"
> > > #)
> > 
> > How about this?
> > 
> > replace="
> >     '4d 1280 768 24'
> >     '5c 1400 1050 16'
> > "
> > 
> 
> Actually, that may work better than my delimited with ; approach.
> We could then do
> 
> eval set -- "${replace}"
> for x in "$@" ; do
>  ....
> done

That works with your ; approach too, as well as with the
newline-separated approach:

replace="
    4d 1280 768 24
    5c 1400 1050 16
"

IFS=';
'
#set -f
set -- ${replace}
#set +f
unset IFS

for x ; do
  ....
done

Attachment: pgprrqWQ2pIf0.pgp
Description: PGP signature

Reply via email to