#!/bin/sh # # rm0 - remove file if empty # # $Id$ args= while [ $# -gt 0 ] do case "$1" in -*) args="$args $1" ;; *) break ;; esac shift done for f in "$@" do if [ -f "$f" ] && cmp "$f" /dev/null 2>/dev/null then echo rm $args "$f" 1>&2 rm $args "$f" fi done