help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Root access in subshell


From: Bob Proulx
Subject: Re: [Help-bash] Root access in subshell
Date: Mon, 3 Feb 2014 16:02:26 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

Richard Taubo wrote:
> Chris Down wrote:
> > Richard Taubo wrote:
> >> I see that if the subshell is set to a variable I can return 
> >> the feedback to the main shell — are there other ways to return such
> >> feedback to the main shell?
> > 
> > What do you mean by "return the feedback to the main shell"?
> 
> Sorry for the unclarity.
> I meant: Return the *result* of the command in the subshell to the
> main shell.

Unfortunately your clarification is no more clear than your original. :-(

The shell *does* return the result of the command in the subshell back
to the main shell.  It does.  Why do you think it does not?  This is
what the bash manual says about it.

   Command Substitution
       ...
       Bash performs the expansion by executing command and replacing
       the command substitution with the standard output of the
       command, with any trailing newlines deleted.  Embedded newlines
       are not deleted, but they may be removed during word splitting.
       ...

That works just fine to "return feedback to the calling shell".  What
more do you want?

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]