On 22/12/14 19:51, pe...@easthope.ca wrote: > This command in a shell script removes unwanted log files. > > for i in $( echo *.Log ); do > /bin/rm $i; > echo "Removed $i." > done > > In the edge case of no matching files, rm complains. > /bin/rm: cannot remove `*.Log': No such file or directory > > If echo is replaced with ls, it complains when there > is no match. > > Does anyone have a tidy solution for this task?
rm --verbose --force *.Log hth, Jerome > > Thanks, ... Peter E. > > > -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/549870b1.6030...@rezozer.net