I have created 5 arrays which contains only floating numbers (contains positive and negative numbers).
Following are the arrays which are declared:
- assets
- reported
- debit
- credit
- affiliate
- loans
I need to perform below formula on the arrays but it's not working.
Is there any other approach?
for((i =1 ; i <(#$assets[@]}; i++));do
echo ${assets[i]} - ( ${reported[i]} + ( ${affiliate[i]} * -1 ) + ${loans[i]} + (${credit[i]} - ${debit[i]})) | bc >> test.log