environment

2009-02-13 Thread Antonio Macchi
$ declare +x x $ x=one $ ( echo $x; x=two; echo $x ) one two subshell inherits "x"? is this behavior coherent?

cancel

2009-02-13 Thread antonio_macchi
This message was cancelled from within Mozilla.

Re: environment

2009-02-13 Thread Pierre Gaston
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

Re: environment

2009-02-13 Thread Antonio Macchi
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

Re: environment

2009-02-13 Thread Sitaram Chamarty
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

Re: ca - New bash command proposal

2009-02-13 Thread Chet Ramey
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

Re: environment

2009-02-13 Thread Chet Ramey
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 (

Re: Question about redirecting output of spawned processes

2009-02-13 Thread Eric415
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.

Fishing for suggestions.

2009-02-13 Thread Joe Murray99
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