aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/bash.html
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2024-04-05 23:16:19 +0000
committerjohannst <johannst@users.noreply.github.com>2024-04-05 23:16:19 +0000
commit63d71256f83e5da6479d90d1bbdaf17ad6d31f02 (patch)
tree764f346960e00afaf945673a365d0063f64f29ff /tools/bash.html
parent1d01762f8b174573dd58e6da1630bd92bc193512 (diff)
downloadnotes-63d71256f83e5da6479d90d1bbdaf17ad6d31f02.tar.gz
notes-63d71256f83e5da6479d90d1bbdaf17ad6d31f02.zip
deploy: c660b71b9689af89bc09671e6a6de7f9943e2709
Diffstat (limited to 'tools/bash.html')
-rw-r--r--tools/bash.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/bash.html b/tools/bash.html
index 91d44cb..c990d81 100644
--- a/tools/bash.html
+++ b/tools/bash.html
@@ -213,6 +213,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"
</code></pre>
<blockquote>
<p>Note: <code>prefix</code>/<code>suffix</code>/<code>pattern</code> are expanded as <a href="#pathname">pathnames</a>.</p>