On 2009-01-15, Jan Schampera wrote: ... > I have another one, maybe my misinterpretion or an unclean documentation: > > $ TEXT="Test" > $ echo ${TEXT^s} > Test > > I expected "TeSt", since the pattern is "s", and the 3rd letter in > "Test" matches that, and should be changed. Interesting that it works > with ^^s (for "Tesst" then), but for all "s", of course.
man bash4: ... the ^ and , expansions match and convert only the first character. -- Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com> =================================================================== Author: Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)