Code:
if [ ! -s $FILE ];
then
echo "Error $FILE does not exists!"
else
echo "$FILE found!"
fi
OR
Code:
#!/usr/bin/expect -f
set filename "/tmp/file"
set file_status [file exists $filename]
if { $file_status > 0 } {
set retcode [file size $filename]
puts "$filename exists and is $retcode bytes."
} else {
puts "$filename not found!"
}
0 comentários :
Enviar um comentário