On 09/02/13 at 08:29am, David Guntner wrote: > Darac Marjal grabbed a keyboard and wrote: > > On Mon, Sep 02, 2013 at 08:06:17AM -0700, David Guntner wrote: > >> Matej Kosik grabbed a keyboard and wrote: > >> > >> What do you mean by "appears in a subshell?" > > > > From "man 1 bash": > > (list) list is executed in a subshell environment (see COMMAND EXECU‐ > > TION ENVIRONMENT below). Variable assignments and builtin com‐ > > mands that affect the shell's environment do not remain in > > effect after the command completes. The return status is the > > exit status of list. > > Ok, I'm still not following you. > > What, exactly, is it that you are doing at your keyboard, in order to > run it in this "subshell?" I'm assuming that in your main one you're > just typing the expression and hitting enter. So what are you doing > when the second example fails?
Respectfully, read the snippet from bash(1) he provided. Commands in parentheses are executed in a "subshell". which is a second instance of bash with its own (inherited) working environment. If you're not a bash person, that's OK, but don't reply to bash questions (: -- Liam
signature.asc
Description: Digital signature