#!/bin/bash
##for get the value of the command free
#for get the value of the command free with no para
function forFreeValueOfFreeWithNothing (){
freeString=`free`
freeStringLength=${#freeString}
for((val=0;val<$freeStringLength;val++))
do
echo "line $val ${freeString:$val:1}"
done
val1=`expr index "$freeString" free`
val2=${freeString:$val1:`expr $val1 + 4`}
echo $freeString
echo $val1
echo $val2
echo $freeStringLength
}
##for get the value of the command free
#for get the value of the command free with no para
function forFreeValueOfFreeWithNothing (){
freeString=`free`
freeStringLength=${#freeString}
for((val=0;val<$freeStringLength;val++))
do
echo "line $val ${freeString:$val:1}"
done
val1=`expr index "$freeString" free`
val2=${freeString:$val1:`expr $val1 + 4`}
echo $freeString
echo $val1
echo $val2
echo $freeStringLength
}