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
  • so, "Only the processes stipulated in the first level of curly braces are run within the scope of the original Bash shell." Commented Nov 30, 2014 at 19:25
  • @xealits - is that a follow up Q you're asking me? Commented Nov 30, 2014 at 22:36
  • @slm it's just the emphasis on the main point of the answer, as I saw it. Commands in the first level of curly braces run in current shell, nested curly braces create new shells. Parentheses differ in creating subshell right away, at the first level. If I got it wrong -- correct me. But, as others point, the initial question has also pipelines. Thus the creation of separate processes. And curly braces have to create a shell when used for a separate process. So, probably, it is the reason for the behaviour in question. Commented Dec 1, 2014 at 17:12
  • now, after rereading your post, I see I was wrong -- the nesting statement concerns only the case with pipelines. So, the curly braces don't ever create new shells, unless you wrap a separate process with them -- then they have to. Commented Dec 1, 2014 at 17:15
  • @xealits - that's correct. Commented Dec 1, 2014 at 17:15