summaryrefslogtreecommitdiff
path: root/Heredoc.md
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-06-02 12:15:47 +0200
committerJasper Ras <jras@hostnet.nl>2025-06-02 12:17:02 +0200
commit9bd8cdf2ecc2b60f873b393122b19985cbc4587c (patch)
treea4e0ad7e2824e24b187525fc3c51f8d382d1aceb /Heredoc.md
parenta61d928b279c5c508aca3bfc7cb14d810c3d75de (diff)
vault backup: 2025-06-02 12:15:47
Diffstat (limited to 'Heredoc.md')
-rw-r--r--Heredoc.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/Heredoc.md b/Heredoc.md
new file mode 100644
index 0000000..84c0fa5
--- /dev/null
+++ b/Heredoc.md
@@ -0,0 +1,23 @@
+---
+tags:
+ - bash
+---
+[[Bash]]
+
+---
+```
+read -r -d '' VAR <<EOF
+blaat
+EOF
+```
+
+```
+var=$(
+cat <<EOF
+blaat
+EOF
+)
+```
+
+Quote EOF/NAME to prevent expansion
+Put - after << to remove indentation from result \ No newline at end of file