This commit is contained in:
olli 2024-06-27 15:54:32 +02:00
parent f0d521b49a
commit f5af07290e

View File

@ -8,7 +8,7 @@ function g_read_csv {
local g_headline=$3
local g_separator=$4
local g_headline_item i l r
local g_headline_item i l r g_csv_headline_array
# check for individual separator
[ -z "$g_separator" ] && g_separator=","
@ -39,6 +39,7 @@ function g_read_csv {
[ -z "$g_headline" ] && g_headline=$(head -n1 "${g_csvfile}")
# read the headline
unset g_csv_headline_array_ref
g_array "$g_headline" g_csv_headline_array_ref $g_separator
# prepare varnames from headline(s)