On Thu, 2007-10-25 at 16:40 +0100, Roy Marples wrote:
> array="1.2.3.4 netmask 5.6.7.8;
> \*
> 'host.name' netmask 1.2.3.4
> -I 'option; $FOO with spaces'
> "
Everyone who commented has agreed that this is the most readable,
maintainable and documentable. As such I've comitted a patch for this
int
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 writ
On Fri, 2007-10-26 at 06:16 -0400, Richard Freeman wrote:
> If there is some problem with this suggestion feel free to shoot it full
> of holes, but how about something like:
>
> address_eth0="1.2.3.4"
> netmask_eth0="255.255.255.0"
> broadcast_eth0="1.2.3.255"
> gateway_eth0="1.2.3.1"
> network_
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Roy Marples wrote:
>>> 0_config_eth0="1.2.3.4 netmask 5.6.7.8;"
>>> 1_config_eth0="\*"
>>> 2_config_eth0="'host.name' netmask 1.2.3.4"
>>> 3_config_eth0="-I 'option; $FOO with spaces'"
>> I was hoping for some sort of meaningfully named separate variab
On Thu, 2007-10-25 at 23:13 -0700, Alec Warner wrote:
> Can I vote for none of the above? :)
Sure you can - provided you come up with an alternative approach to the
problem :)
> 1 > *
Yes, that appears to be every ones thought so far.
Thanks
Roy
--
[EMAIL PROTECTED] mailing list
On Thu, 2007-10-25 at 15:56 -0700, Donnie Berkholz wrote:
> On 22:49 Thu 25 Oct , Roy Marples wrote:
> > On Thu, 2007-10-25 at 14:31 -0700, Donnie Berkholz wrote:
> > > Is there any way we could avoid these altogether, and instead use
> > > separate variables for each array element?
> >
> >
On 10/25/07, Roy Marples <[EMAIL PROTECTED]> wrote:
> Hello List
>
> It's your favourite posix shell lover here, asking for your honest
> opinions.
>
> array="1.2.3.4 netmask 5.6.7.8;
> \*
> 'host.name' netmask 1.2.3.4
> -I 'option; $FOO with spaces'
> "
>
> array=("1.2.3.4 netmask 5.6.7.8;"
> "\*"
On 22:49 Thu 25 Oct , Roy Marples wrote:
> On Thu, 2007-10-25 at 14:31 -0700, Donnie Berkholz wrote:
> > Is there any way we could avoid these altogether, and instead use
> > separate variables for each array element?
>
> Well, we could prefix with numbers
>
> array="1.2.3.4 netmask 5.6.7.8;
On Thu, 2007-10-25 at 14:31 -0700, Donnie Berkholz wrote:
> Is there any way we could avoid these altogether, and instead use
> separate variables for each array element?
Well, we could prefix with numbers
array="1.2.3.4 netmask 5.6.7.8;
\*
'host.name' netmask 1.2.3.4
-I 'option; $FOO with space
On 16:40 Thu 25 Oct , Roy Marples wrote:
> Hello List
>
> It's your favourite posix shell lover here, asking for your honest
> opinions.
>
> array="1.2.3.4 netmask 5.6.7.8;
> \*
> 'host.name' netmask 1.2.3.4
> -I 'option; $FOO with spaces'
> "
>
> array=("1.2.3.4 netmask 5.6.7.8;"
> "\*"
> "
Roy Marples wrote:
> Hello List
>
> It's your favourite posix shell lover here, asking for your honest
> opinions.
>
> array="1.2.3.4 netmask 5.6.7.8;
> \*
> 'host.name' netmask 1.2.3.4
> -I 'option; $FOO with spaces'
> "
>
> array=("1.2.3.4 netmask 5.6.7.8;"
> "\*"
> "'host.name' netmask 1.2.3.
Form #1 looks clearer than #3, but still not so clear :)
On 10/25/07, Roy Marples <[EMAIL PROTECTED]> wrote:
>
> On Thu, 2007-10-25 at 18:02 +0200, Marijn Schouten (hkBst) wrote:
> > These sh ``arrays'' are really just strings, right? Did you implement
> > functions to take them apart? Can the sam
On Thu, 2007-10-25 at 18:02 +0200, Marijn Schouten (hkBst) wrote:
> These sh ``arrays'' are really just strings, right? Did you implement
> functions to take them apart? Can the same function handle forms 1 and 3?
I don't think we could use both.
Here's a code snippet of actually using them
# Ho
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Roy Marples wrote:
> Hello List
>
> It's your favourite posix shell lover here, asking for your honest
> opinions.
>
> array="1.2.3.4 netmask 5.6.7.8;
> \*
> 'host.name' netmask 1.2.3.4
> -I 'option; $FOO with spaces'
> "
>
> array=("1.2.3.4 netmask
Hello List
It's your favourite posix shell lover here, asking for your honest
opinions.
array="1.2.3.4 netmask 5.6.7.8;
\*
'host.name' netmask 1.2.3.4
-I 'option; $FOO with spaces'
"
array=("1.2.3.4 netmask 5.6.7.8;"
"\*"
"'host.name' netmask 1.2.3.4"
"-I 'option; $FOO with spaces'"
)
array="'1
15 matches
Mail list logo