OSDN Git Service

Regular updates
[twpd/master.git] / bash.md
diff --git a/bash.md b/bash.md
index 8f63f0e..ab61a3a 100644 (file)
--- a/bash.md
+++ b/bash.md
@@ -199,6 +199,19 @@ comment
 
 | `${#FOO}` | Length of `$FOO` |
 
+### Manipulation
+
+```bash
+STR="HELLO WORLD!"
+echo ${STR,}   #=> "hELLO WORLD!" (lowercase 1st letter)
+echo ${STR,,}  #=> "hello world!" (all lowercase)
+
+STR="hello world!"
+echo ${STR^}   #=> "Hello world!" (uppercase 1st letter)
+echo ${STR^^}  #=> "HELLO WORLD!" (all uppercase)
+```
+
+
 ### Default values
 
 | `${FOO:-val}`        | `$FOO`, or `val` if not set |