diff options
Diffstat (limited to 'Heredoc.md')
-rw-r--r-- | Heredoc.md | 23 |
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 |