Подскажите, пожалуйста, мои ошибки в структурировании и тд.#!/bin/sh
touch stat.txt
touch est.txt
n=101
a=1
while [ $a -le $1 ]
do
n=`expr $a + 100`
/sbin/ifconfig vlan$n create && ifconfig vlan$n inet 192.168.$a.1 netmask 255.255.255.0 vlan $n vlandev em0
a=`expr $a + 1`
done
i=1
while [ $i -le $1 ]
do
c=$i
/usr/local/bin/iperf -c 192.168.$c.3 -t 10 -y C >> stat.txt &
i=`expr $i + 1`
done
sleep 15
FILENAME=/usr/home/main/stat.txt
for y in $(cut -d, -f 9 $FILENAME)
do
echo $y >> /usr/home/main/est.txt &
done
n=101
a=1
while [ $a -le $1 ]
do
n=`expr $a + 100`
/sbin/ifconfig vlan$n destroy
a=`expr $a + 1`
done
n=0
while read line
do
let "n=$n+"$line""
clear
done < est.txt
let "m=$n/1000000"
rm stat.txt
rm est.txt