Created
July 28, 2013 23:07
-
-
Save hatappo/6100650 to your computer and use it in GitHub Desktop.
sh でヒアドキュメントを変数に代入するには、catで受けてコマンド展開する。
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
sql=`cat <<'EOS' | |
SELECT * FROM mysql.user | |
WHERE User = 'root' | |
AND Host = 'localhost' | |
\G | |
EOS` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment