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.

6
  • can someone please explain what is $SHELL and why we need it? Commented May 15, 2017 at 18:09
  • 2
    The $SHELL contains your currently running shell, on most Linux systems this will be /bin/bash but it could be /usr/bin/zsh or something else. The advantage of using the $SHELL variable is that this way the command will be executed using your regular shell settings.
    – Wolph
    Commented May 15, 2017 at 22:04
  • @RoVo: the EOF depends on the earlier EOF and is the standard for multiline input in bash-like shells. If you changed the <<EOF to something else the EOF at the end needs to change too. Which shell (and version) are you using?
    – Wolph
    Commented Jul 27, 2017 at 21:53
  • I did not change the first EOF. EOF is working, but not EOF &. Just opens a new line. I use GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu). The first option works for me though, just needed bash -c for having bash builtins.
    – pLumo
    Commented Jul 28, 2017 at 7:32
  • 2
    @RoVo I think I may have placed the & at the wrong location with the original answer, try the updated answer :)
    – Wolph
    Commented Jul 31, 2017 at 2:40