Re: shell script removing log files.

2014-12-22 Thread Andrei POPESCU
On Lu, 22 dec 14, 10:51:26, 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 fi

Re: shell script removing log files.

2014-12-22 Thread Karl E. Jorgensen
On Mon, Dec 22, 2014 at 10:51:26AM -0800, 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 `*.L

Re: shell script removing log files.

2014-12-22 Thread Jerome BENOIT
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 d

Re: shell script removing log files.

2014-12-22 Thread The Wanderer
On 12/22/2014 at 01:51 PM, 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 fi

shell script removing log files.

2014-12-22 Thread peter
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