aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/bash.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/bash.md b/src/tools/bash.md
index e12d8c0..f27b3a2 100644
--- a/src/tools/bash.md
+++ b/src/tools/bash.md
@@ -41,6 +41,11 @@ ${foo/pattern/string} # replace pattern with string when expanding foo
# '/' replace all occurences of pattern
# '#' pattern match at beginning
# '%' pattern match at end
+
+# set programmatically with priintf builtin
+printf -v "VAR1" "abc"
+NAME=VAR2
+printf -v "$NAME" "%s" "def"
```
> Note: `prefix`/`suffix`/`pattern` are expanded as [pathnames](#pathname).