read csv files to vars
This commit is contained in:
parent
8de696a9ce
commit
6f7bbfd2a7
@ -64,9 +64,10 @@ function g_read_csv {
|
||||
# put headlines to vars with reverse numbers (last line 0)
|
||||
for g_headline_item in "${g_csv_headline_array[@]}"
|
||||
do
|
||||
declare -g v_${l}_${g_headline_item}="${g_csv_line_array[i]}"
|
||||
#declare -g v_${l}_${g_headline_item}="${g_csv_line_array[i]}"
|
||||
# last line to vars without number
|
||||
[ "$l" = 0 ] && declare -g v_${g_headline_item}="${g_csv_line_array[i]}"
|
||||
v_csv_array_associative[${g_headline_item}_${l}]="${g_csv_line_array[i]}"
|
||||
((i++))
|
||||
done
|
||||
((l++))
|
||||
|
Loading…
Reference in New Issue
Block a user