I want to replace the 2 in "2p" with the i variable value each time on the for loop.
count1=0
for i in 2 3 4 5 6 7 8 9 10 11
do
var=`cat participantes | cut -d '-' -f4 | sed -n 2p`
echo $var
count1=`expr $count1 + $var`
done
echo $count1
I want to replace the 2 in "2p" with the i variable value each time on the for loop.
count1=0
for i in 2 3 4 5 6 7 8 9 10 11
do
var=`cat participantes | cut -d '-' -f4 | sed -n 2p`
echo $var
count1=`expr $count1 + $var`
done
echo $count1