1 |
On Thu, 2007-10-25 at 18:02 +0200, Marijn Schouten (hkBst) wrote: |
2 |
> These sh ``arrays'' are really just strings, right? Did you implement |
3 |
> functions to take them apart? Can the same function handle forms 1 and 3? |
4 |
|
5 |
I don't think we could use both. |
6 |
Here's a code snippet of actually using them |
7 |
|
8 |
# How baselayout-2 presently handles arrays |
9 |
eval "$(_get_array array)" |
10 |
for x in "$@"; do |
11 |
echo "$x" |
12 |
done |
13 |
|
14 |
# How baselayout-2 may handle arrays based on this discussion |
15 |
IFS=" |
16 |
" |
17 |
for x in $(_get_array array); do |
18 |
unset IFS |
19 |
echo "$x" |
20 |
done |
21 |
|
22 |
Assume that the _get_array function correctly maps the bash array to the |
23 |
posix shell one in both cases. |
24 |
|
25 |
Thanks |
26 |
|
27 |
Roy |
28 |
|
29 |
-- |
30 |
gentoo-dev@g.o mailing list |