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

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

Re: [shell-script] empty file


From: Fabricio
Subject: Re: [shell-script] empty file
Date: Thu, 18 Aug 2005 15:06:46 -0300
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

      -s FILE
             FILE exists and has a size greater than zero

if [[ -s $file ]] ; then
echo  "Arquivo bunitinho , tem algo :D"
else
echo "Aquivo com tamanho 0 o.o"
fi

isso ?

Como eu faço em shell pra verificar se um arquivo é vazio?

eu fiz uma gambiarra orivel tipo:

for i in `ls`; do

find $i -size 0b;

etc.




reply via email to

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