How to save array to file and another file array load?
file1.sh
ARR=("aaa" "bbb" "ccc");
save to file2; # I do not know how :-(
and
file3.sh
load from file2; # I do not know how :-(
echo ${ARR[@]};
I tried...
file1.sh
declare -a ARR > /tmp/file2
and
file3.sh
source /tmp/file2
echo ${ARR[@]};
does not work :-( Advise someone better way? Thank you...