I'm new to bash and can't find a good tutorial to answer my question.
array=( item1 item2 item3 )
for name in ${array[@]}; do
echo current/total
... some other codes
done
I want to calculate the "current"current
and "total"total
value, as the expected output of this being:
1/3
2/3
3/3
Thanks for any kind of tips.