shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash shell


From: miguel
Subject: bash shell
Date: Mon, 19 Feb 2007 20:52:52 +0100 (CET)

Olá, 
Estou bolando um script : 

#!/bin/bash
# **********************************************
for mmdd in "01 31" "02 28" "07 31" "08 30" "09 30"
"10 31"
do
        set -- $mmdd      #
#################################done
echo $1  # start_month2
echo $1  # end_month2

start_day2=01
end_day2=`printf '%02d\n' $((start_day2+1))`
while [ $start_day2 -le $2 ]
do
echo "star mes dia"
echo $start_day2
echo $end_day2
echo
echo
"************************************************"
start_day2=`printf '%02d\n' $((start_day2+1))`
end_day2=`printf '%02d\n' $((start_day2+1))`
done
done


Al rodar estou recebendo errores:

[miguel@miguel wrfsi]$ ./wrf_modificado66.bash
01
01
star mes dia
01
02

************************************************
star mes dia
02
03

************************************************
star mes dia
03
04

************************************************
star mes dia
04
05

************************************************
star mes dia
05
06

************************************************
star mes dia
06
07

************************************************
star mes dia
07
08

************************************************
./wrf_modificado66.bash: line 1: 08: value too great
for base (error token is "08")
star mes dia
08


************************************************
./wrf_modificado66.bash: line 1: 08: value too great
for base (error token is "08")
./wrf_modificado66.bash: line 12: [: -le: unary
operator expected
02



 Agradeço a atenção de vocês


                
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]