-
G'day and happy Easter, KornShell 93 developers. I'm trying to write a script that reads a file containing information about other files to be unpacked by Is there any way to workaround this? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
In case you wondering, here is part of my log with set -x being sprinkled over the script:
|
Beta Was this translation helpful? Give feedback.
-
It is impossible to find out the cause of the error without seeing your code. The |
Beta Was this translation helpful? Give feedback.
-
One possibility is that you may actually be assigning to an indexed array even if you think you're assigning to an associative array. Make sure all associative arrays have been declared as such using |
Beta Was this translation helpful? Give feedback.
-
It basically defines a DESTDIR="$base_destdir/$VARIANT/${pconf['Archive_name']%.t*}" |
Beta Was this translation helpful? Give feedback.
-
This is the code that reads information at the file and declares it as an associative array: function read_manifest {
(sed '/#/d; /^$/d;' "$1") \
| for ((;;)); do
if IFS='=' read id v; then
printf 'pconf['%s']="%s"\n' "$id" "$v"
else
break
fi
done
} |
Beta Was this translation helpful? Give feedback.
-
It does not, though. An associative array is declared like |
Beta Was this translation helpful? Give feedback.
It does not, though. An associative array is declared like
typeset -A pconf
.