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: Richard Taubo
Subject: Re: [Help-bash] Root access in subshell
Date: Tue, 4 Feb 2014 00:57:43 +0100

On Feb 4, 2014, at 12:02 AM, Bob Proulx <address@hidden> wrote:

> 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. :-(

Well, I am sorry about that.

> 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?

I was trying to make a distinction between how the Find command run in the main 
shell
would show the result directly in the terminal, whereas the result
of a Find command in a subshell would have to be set to a variable before the 
main shell
could display the result in the terminal.

Am I clearer, or is that just as bad?

Richard Taubo


reply via email to

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