Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • Thanks it works. Could you explain what the 'EOF' doe exactly? Thanks Commented Dec 8, 2013 at 23:21
  • 2
    @Michael - It's just the delimiter that indicates the end of the heredoc. You could just as validly use FOO, and end the heredoc with FOO on a line by itself. Commented Dec 8, 2013 at 23:21
  • @Michael - please be sure to mark this as the accepted answer so that others know your issue's been resolved. Commented Dec 8, 2013 at 23:55
  • I do not understand the purpose of such subtlety in bash. Is it by design? Could some one explain. Thanks. Commented Dec 9, 2013 at 0:14
  • 1
    yes It is by design. If you want to use variables in your here-document you want one behavior, If you want simpler quoting you want another. Commented Dec 9, 2013 at 2:18