for i in 0 1 2 3 4 5
do
echo "$previous_tmp$i"
if [ ${ARRAY_MOUNT_POINT_CAPACITY[$i]} -eq $previous_tmp$i]
then
echo "File Size Same of ${ARRAY_MOUNT_POINT_NAME[$i]}"
elif [ ${ARRAY_MOUNT_POINT_CAPACITY[$i]} -gt $previous_tmp$i ]
then
echo "Mount Point Increase"
else
echo "Mount Point Decrease"
fi
done
In the line : if [ ${ARRAY_MOUNT_POINT_CAPACITY[$i]} -eq $previous_tmp$i]
, how do I write the statement $previous_tmp$i so that if cals the proper variables ?
I have already defined them . The issue that I am facing right now is how to call the variable within another variable .
$previous_tmp$i
$i is one variables that is being called within $previous_tmp$i.
when the value of i =0,
it should be
$previous_tmp1
which then calls the value stored in $previous_tmp1 that is 23 that i got using
Without that missing space, you wont be going far...
If i is a vatirable "within a variable" it can only be the same.. if i=0 it cannot be i=1 unless you affect a new value... or its another variable... so create another one...