Na linha
if [ $VMSTAT_IO_R -gt 0 ] and [ $VMSTAT_IO_W -gt 0 }
O último caracter é um } (chaves), deve ser um ] (colchete).
Em 30/11/06, Andre Campos <[EMAIL PROTECTED]> escreveu:
>
>
>
>
>
>
>
> Amigos,
>
> Alguém saberia me dizer o que está errado nessa rotina???
>
> #!/bin/ksh
> while true
> do
> iostat -x 300 1|\
> sed 1,2d|\
> awk '{ printf("%s %s %s\n", $1, $4, $5) }' |\
> while read HDISK VMSTAT_IO_R VMSTAT_IO_W
> do
> if [ $VMSTAT_IO_R -gt 0 ] and [ $VMSTAT_IO_W -gt 0 }
> then
> sqlplus -s perfstat/perfstat <<!
> insert into perfstat.stats\$iostat
> values
> (SYSDATE, 5, '$HDISK', $VMSTAT_IO_R, $VMSTAT_IO_W);
> exit
> !
> fi
> done
> sleep 300
> done
>
> Estou recebendo o seguinte erro : io.sh: [: missing `]'
>
> Obrigado
>
> André Campos
>
>
--
.o. André Bertelli Araújo Debian GNU/Linux
..o http://bertelli.name Linux user #248583
ooo <><