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

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

Re: [shell-script] AJuda pela amor de Deus!


From: Felipe Kellermann
Subject: Re: [shell-script] AJuda pela amor de Deus!
Date: Thu, 20 Jul 2006 17:50:30 -0300 (BRT)
User-agent: Pine <http://www.washington.edu/pine/>

On Thu, 20 Jul 2006 5:45pm  -0300, Tiago Barcellos Peczenyj wrote:

> vc tambem pode comparar usando a opção -f
> 
> if [ -f /var/mail/$usuario ]
> then # faz algo se existe
> else # faz algo se não existe
> fi
> 
> não lembrei do test -f antes...

Eu achei estranho o teu ls fechando os descritores  ;-)

Mas um comentário sobre este teste: Neste caso, se a conta do usuário for 
tipo Maildir em /var/mail, o teste com -f não vai funcionar.  Só usar -e.

-- 
Felipe Kellermann


reply via email to

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