[Techtalk] lower to upper case
Benjamin A'Lee
bma+lists at subvert.org.uk
Tue Oct 9 13:51:44 UTC 2007
On Tue, Oct 09, 2007 at 11:28:48AM +1000, Miriam English wrote:
> for file in *
> do
> mv $file `echo $file | tr '[a-z]' 'A-Z'`
> done
>
> In my text editor I'd simply replace each filename with \U& but that
> isn't possible directly in bash.
>
> Is there an even simpler way?
Take a look at moreutils (http://kitenet.net/~joey/code/moreutils, or available
as a debian package). It includes a script 'vidir' which lets you edit a
directory in your text editor, so you can do anything that you can do with vi.
Possibly overkill for the simpler situatios, but great for more complicated
ones.
Ben
More information about the Techtalk
mailing list