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.

2
  • The << operator takes a string and then reads everything until it finds that string again. You need <<EOF\n$COUNTER\nEOF. Commented Jun 12, 2016 at 0:10
  • 1
    Since you appear to want to send only a single value, why not use a here string <<< "$COUNTER" rather than trying to use a here document? Commented Jun 12, 2016 at 0:16