How do I rename all folders and files to lowercase on Linux?

I have to rename a complete folder tree recursively so that no uppercase letter appears anywhere (it’s C++ source code, but that shouldn’t matter). Bonus points for ignoring CVS and Subversion version control files/folders. The preferred way would be a shell script, since a shell should be available on any Linux box. There were some … Read more

How to capitalize the first character of each word in a string

Is there a function built into Java that capitalizes the first character of each word in a String, and does not affect the others? Examples: jon skeet -> Jon Skeet miles o’Brien -> Miles O’Brien (B remains capital, this rules out Title Case) old mcdonald -> Old Mcdonald* *(Old McDonald would be find too, but … Read more

How to convert a string to lower or upper case in Ruby

How do I take a string and convert it to lower or upper case in Ruby? 1 11 Ruby has a few methods for changing the case of strings. To convert to lowercase, use downcase: “hello James!”.downcase #=> “hello james!” Similarly, upcase capitalizes every letter and capitalize capitalizes the first letter of the string but … Read more