file text.txt:
11
22
test.sh file:
#!bin/bash
mapfile -t data < text.txt
firstVal = printf '%s' "${data[0]}"
printf '%s' $firstVal
exit 0
error:
test.sh: line 5: firstVal: command not found
Question: What is the right expression for assigning the data of array to a variable? I've tried using $() too, but same result.