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*

21
  • 76
    why do you have <<- instead of << on the first line of the 2nd and 5th code block? does - do anything special? Commented Jul 1, 2015 at 18:31
  • 73
    @sup3rman '-' Ignores leading tabs. See stackoverflow.com/questions/2500436/… Commented Aug 30, 2015 at 13:27
  • 12
    how can I make read exit with status 0? It seems like it can't find end of line (since it's -d '') and exits with 1 which doesn't help when you are in script. Commented Nov 30, 2015 at 16:52
  • 10
    @MishaSlyusarev use -d '\0' and add a \0 at the end of your last line Commented Jan 21, 2016 at 11:48
  • 20
    Using the -d option in read -r -d '' VARIABLE <<- EOM did not work for me. Commented May 12, 2016 at 11:58