#!/bin/bash
c=0
for i in a b; do
log[$c]="$i"
((c++))
done
for i in ${log[@]}; do
echo $i
done
Example
# ./btest
a
b
#!/bin/bash
c=0
for i in a b; do
log[$c]="$i"
((c++))
done
for i in ${log[@]}; do
echo $i
done
Example
# ./btest
a
b