On Fri, Mar 11, 2011 at 11:56 AM, Chris F.A. Johnson <ch...@cfajohnson.com>wrote:
> > I suggested using parameter expansion with patterns in > <http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00020.html>: > > $ foo=bar > $ echo ${foo^} ## Convert first character > Bar > $ echo ${foo^^} ## Convert all characters > BAR > $ echo ${foo^[a-m]} ## Convert first character that matches pattern > Bar > $ echo ${foo^^[a-m]} ## Convert all characters that match pattern > BAr > > This sounds more reasonable to me. > -- > Chris F.A. Johnson, <http://cfajohnson.com/> > Author: > Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress) > Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) > > -- Clark J. Wang