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

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

Re: [shell-script] Script Antivirus - Adicionar variavel !!!


From: moysespr
Subject: Re: [shell-script] Script Antivirus - Adicionar variavel !!!
Date: Sat, 3 Jan 2004 19:06:43 -0800 (PST)

Na linha do mutt, isto deve resolver:

-s "aqui seu subject com data de: `stat -c %x $ARQUIVO`"

Estou supondo que aí é o ponto do tal subject citado.

Se desejar encurtar essa data é so fazer:
stat -c %x $ARQUIVO|cut -d" " -f 1
ou
stat -c %x $ARQUIVO|cut -d. -f 1
ou ...

Feliz 2004!


--- Andrew Amorim <address@hidden> wrote:
> Olá para todos.
> 
> Por favor, com base no script abaixo, gostaria de uma ajuda de vocês...
> Já tentei usar uma dica de um colega, mas não consegui...
> Queria que quando eu enviasse o e-mail para o usuário, no Subject do e-mail
> adicionasse a data da atualização!
> Nesta ocasião, eu teria que pegar a data dos arquivos novos que foram
> baixados.
> Isso eu consigo através do comando:
> 
> # stat -c %x nomedoarquivo.
> 
> Tentei usar ao invés do nome o arquivo, a variavel que já existe dentro
> script para colocar os datas dentro do arquivo data....assim:
> 
> stat -c %x $mArquivo > data
> 
> Depois era só fazer um read....
> 
> Se não entendeeram, por favor, me perguntem.
> Espero não ter complicado.
> 
> Muito obrigado a todos e um feliz ano novo!!!!
> 
> ###########################
> Script de atualizacao do antivirus
> ###########################
> 
> SHEEL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> HOME=/
> cd /var/www/softw/60/fe
> mv avg6info.ctf avg6info.ctf.old
> mv ref_email.ti ref_email.ti.old
> wget -r -nd -t 3 -w 10 http://files.grisoft.cz/softw/60/xx/avg6info.ctf
> cat avg6info.ctf | grep bin | cut -c 2-13 > lista.txt
> cat lista.txt | while read mArquivo
> do
> if [ ! -f $mArquivo ]
> then
> wget -r -nd -t 3 -w 10 http://files.grisoft.cz/softw/60/xx/$mArquivo
> touch ref_email.ti
> chmod 755 $mArquivo
> fi
> done
> if [ -f /var/www/softw/60/fe/avg6info.ctf ]
> then
> rm avg6info.ctf.old
> else
> mv avg6info.ctf.old avg6info.ctf
> fi
> #####################################
> Envio do email para os usuários...
> #####################################
> if [ -f ref_email.ti ]
> then
> for USUARIOS in `cat users | cut -d: -f1`
> do
> cat menssagem.txt | mutt -a upavg.gif -s " ATUALIZACAO SERVIDOR INTRANET AVG
> ASSAI EFETUADA " $USUARIOS
> done
> else
> mv ref_email.ti.old ref_email.ti
> fi
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.557 / Virus Database: 349 - Release Date: 30/12/2003
> 
> 
> [As partes desta mensagem que não continham texto foram removidas]
> 
> 


__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003


reply via email to

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