#!/bin/bash tamanho='du -h $1 |grep "0"' if [ -n "$tamanho" ]; then rm -f $1 echo "arquivo apagado" fi