Parte das variáveis dependem da execução do comando
antes e da forma como está pega o resultado do comando
anterior, então tente essa nova estrutura:
#variaveis (parte 1)
ENDER1="0"
ENDER2="0"
QTDEMSG="0"
PING="/bin/ping"
ARQEND1="saida1_tarefa6"
ARQEND2="saida2_tarefa6"
#codigo
clear
echo ""
echo -n "Insira o primeiro endereco para verificacao:
"; read ENDER1;
echo -n "Insira o segundo endereco para verificacao:
"; read ENDER2;
echo -n "Quantas mensagens ICMP enviadas? "; read
QTDEMSG;
$PING $ENDER1 > $ARQEND1 -c $QTDEMSG
$PING $ENDER2 > $ARQEND2 -c $QTDEMSG
#variaveis (parte 2)
PCTENV1=`cat saida1_tarefa6 |grep packets |awk '{print
$1}'`
PCTENV2=`cat saida2_tarefa6 |grep packets |awk '{print
$1}'`
PCTRCV1=`cat saida1_tarefa6 |grep received |awk '{print
$4}'`
PCTRCV2=`cat saida2_tarefa6 |grep received |awk '{print
$4}'`
PCTLOSS1=`cat saida1_tarefa6 |grep loss |awk '{print
$6}' |awk -F'%' '{print $1}'`
PCTLOSS2=`cat saida2_tarefa6 |grep loss |awk '{print
$6}' |awk -F'%' '{print $1}'`
RTT1=`cat saida1_tarefa6 |grep rtt |awk '{print $4}'
|awk -F'/' '{print $1}' |awk -F'.' '{print $1}'`
RTT2=`cat saida2_tarefa6 |grep rtt |awk '{print $4}'
|awk -F'/' '{print $1}' |awk -F'.' '{print $1}'`
[]'s
Itamar