Re removing hyphens from filenames

Abigail abigail at
Thu Jul 12 13:28:52 BST 2007

On Thu, Jul 12, 2007 at 01:10:16PM +0100, Matt Wilson wrote:
> On 7/12/07, Abigail <abigail at> wrote:
> >for f in `find . -name '*-*'`; do mv $f `echo $f | tr -d -`; done
> I generally avoid the use of `for' in operations such as this - you
> never know when people have created files with spaces in the name.

In that case:

for f in `find . -name '*-*'`; do mv $f `echo $f | tr -d -`; done


More information about the mailing list