シェルでファイルのサイズが0かどうかなどをチェックする法

if [ -s file ]; then .. else .. fi

http://www.k4.dion.ne.jp/~mms/unix/shellscript/shell_calc.html