$ declare +x x
$ x=one
$ ( echo $x; x=two; echo $x )
one
two
subshell inherits "x"?
is this behavior coherent?
This message was cancelled from within Mozilla.
On Fri, Feb 13, 2009 at 12:26 PM, Antonio Macchi
wrote:
>
> $ declare +x x
>
> $ x=one
>
> $ ( echo $x; x=two; echo $x )
> one
> two
>
>
>
> subshell inherits "x"?
> is this behavior coherent?
The environment is designed to be inherited.
The subshell even inherits the shell variables.
I 'm not s
The environment is designed to be inherited.
The subshell even inherits the shell variables.
I 'm not sure what causes you trouble here or what it could be incoherent with?
i think that
$ ( echo $x )
is like
$ bash -c 'echo $x'
I'm on error... but I can't understand why
On 2009-02-13, Antonio Macchi wrote:
> i think that
>
> $ ( echo $x )
>
> is like
>
> $ bash -c 'echo $x'
it is confusing I agree. 'man bash' and look for the
section 'COMMAND EXECUTION ENVIRONMENT', which essentially
says that a simple command gets a different environment
(namely only the expor
Rolf Brudeseth wrote:
> Andreas Schwab wrote:
>>
>>
>> ca() { (cd "$@" && pwd -P); }
>>
>> Andreas.
>>
>>
> That works if I want the path to a directory, but it does not let me
> operate on files within the directory.
Once you have the pathname to a directory, you have dozens of tools
available
Antonio Macchi wrote:
>
> $ declare +x x
>
> $ x=one
>
> $ ( echo $x; x=two; echo $x )
> one
> two
>
>
>
> subshell inherits "x"?
> is this behavior coherent?
User-specified subshells execute in an environment that is a duplicate
of the parent shell environment, with a couple of exceptions (
Thanks!! For both the answer and the explanation.
--
View this message in context:
http://www.nabble.com/Question-about-redirecting-output-of-spawned-processes-tp21988680p22007884.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.
I hope I am asking this in the correct place.
I have a number of video serials that I have downloaded from the archives.
They are old but have nice plots.
What I wanted to do was write a bash script that would keep track of what
episode I was watching and return to the next one what I started