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.

Required fields*

5
  • in other words, EOF in this context means an end-of-file marker, not the actual end of the script file. the text "EOF" is any arbitrary text - whatever you use immediately after the << characters will indicate the end of the here-now document. I typically use EOF because it stands out and is very unlikely to be inside the herenow document if, e.g., i'm programatically-generating the shell script (which i do quite often). Commented Jul 8, 2012 at 13:24
  • that bolded EOF should be <underscore><underscore>EOF<underscore><underscore> Commented Jul 8, 2012 at 13:53
  • Using here-documents like this, I have often changed the ending marker to something much more meaningful (and less likely to be "randomly" matched), like END_OF_WHATEVER_FUNCTION. Sometimes, trying to "save" space/size is actually a waste of effort because it causes ambiguity as to what is actually happening. Commented Jul 8, 2012 at 16:51
  • How can you sleep in between commands read from the script? Commented Mar 8, 2014 at 1:03
  • @unexpected62 I don't understand what you're asking. You should probably ask a new question on this site. Be sure to give enough context. Commented Mar 8, 2014 at 1:11