Last active
August 29, 2015 14:02
-
-
Save naftulikay/3a831291167429704158 to your computer and use it in GitHub Desktop.
Multiline Embedded Bash Variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is terribly annoying to remember, but here's how you do multiline | |
# variables in Bash. | |
read -d '' suchvariable <<EOF | |
usage: do this thing | |
preserves linebreak | |
wow such things | |
newlines galore | |
EOF | |
echo -e "$suchvariable" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment