Tool to transform text to all caps or lowercase
You can set this up as a right click service in automator as @Matthieu Riegler suggested.

Open up Automator.app and create a “Service” with this workflow.



Pay close attention to the checkbox up top, “Output replaces selected test”.  After the workflow is in place and saved, navigate to “System Preferences-->Keyboard.”  On the left hand side select “Services”.  On the right hand side you will see the Service you created, in the example its saved as “UpperCase”.  Then give it a shortcut by pressing “Add Shortcut” and give it what you would like.  Tested in TestWrangler and TextEdit.

Script used in Automator:

on run {input, parameters}
set upperCaseString to ¬
    (do shell script ("echo " &amp; input &amp; " | tr a-z A-Z;"))
return upperCaseString
end run