On Thu, Sep 16, 2010 at 01:38:05PM +0200, Michael Wood wrote: > On 16 September 2010 09:02, Alessio Tomelleri - ARPAV Dipartimento di > Belluno <atomell...@arpa.veneto.it> wrote: > > ..maybe could be useful this command ?! get a closer look "man tr" > > > > tr [:upper:] [:lower:] < myfile > > He wants to change the filename, not the contents :) > > > maybe, inserting it in a script as well... > > Try something like: > > for f in *; do
Breaks on filenames with spaces. > lower="`echo $f | tr [:upper:] [:lower:]`" > if [ "$f" != "$lower" ]; then > mv -i "$f" "$lower" > fi > done > > The "mv -i" is in case you have a file called "README.txt" and another > one called "Readme.txt" in the same directory. > > Please try it out on some test files before running it in production. How about "rename 's/(.*)/\L$1\E/' filenames" ? -- Len Sorensen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba