Created
August 15, 2010 01:05
-
-
Save thewoolleyman/524916 to your computer and use it in GitHub Desktop.
heredoc_example
This file contains hidden or 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
#!/usr/bin/env bash | |
# heredoc example | |
# any reason this: | |
x=$( cat <<LINES | |
one 1 | |
two 2 | |
LINES | |
) | |
echo "$x" | |
# ...is better than this? | |
y='one 1 | |
two 2' | |
echo "$y" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment