[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] Diff arquivo
From: |
moysespr |
Subject: |
Re: [shell-script] Diff arquivo |
Date: |
Tue, 21 Oct 2003 19:55:24 -0700 (PDT) |
Pode ser um palpite furado, mas estranhei a expressão:
if(( $E > 0 ))
Se eu fosse fazer algo assim, começaria experimentando:
if [ "$E" != "" ]
ou
if [ $? -ne 0 ] ou -eq ( não sei qual dos dois para o diff )
--- André_Luiz_Alves_da_Silva_Prates <address@hidden>
wrote:
> Algum dos colegas pode me informar porque este script não busca o
> arquivo. Sempre dá pau!
>
>
> ***************
>
> ...
>
> ##---------------------------------- SET PARAMETERS
> -----------------------------
>
> # Directoy of files
> DIRORIG=/LOG/DATA
> DIRBKP=/LOG/DATA/bkp
>
> BRASIL=B.dat
> MAXI=M.dat
> SUL=S.dat
> NOR=N.dat
> FRA=F.dat
>
> ##---------------------------------- Main Program
> -------------------------------
>
> for i in BRASIL MAXI SUL NOR FRA
> do
> E=`diff $DIRORI/$i $DIRBKP/$i`
> if(( $E > 0 ))
> then
> echo "$i Arquivo nao atualizado"
> return 1
> else
> echo "$i Arquivo Atualizado"
> return 0
> fi
> done
>
>
> [As partes desta mensagem que não continham texto foram removidas]
>
>
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
- Diff arquivo, André Luiz Alves da Silva Prates, 2003/10/21
- Re: [shell-script] Diff arquivo,
moysespr <=