Use isto:
# first create those directories
mkdir "${l1[@]}"
# set counter value to 0
c=0
# loop trough the array l1 (while the counter $c is less than the length of the array $l1)
while [ "$c" -lt "${#l1[@]}" ]; do
# echo the corresponding value of array l2 to the file.txt in the directory
echo "${l2[$c]}" > "${l1[$c]}/file.txt"
# increment the counter
let c=c+1
done
O resultado:
$ cat su1/file.txt
1,2,3
$ cat su2/file.txt
4,3,2
$ cat su3/file.txt
4,7,6
$ cat su4/file.txt
3,2,1