Source Code Bug in Bash-4.3.33 Module variables.c

2015-03-07 Thread Eric Robertson
Chet, The Open Source on OpenVMS group has been building Bash for OpenVMS since Bash-4.2.45. Because OpenVMS is not a GNU based operating system, Bash for OpenVMS has to be initially built using a special script procedure written in the OpenVMS native Digital Command Language (DCL) in order t

Re: How to deal with errors in <()?

2015-03-07 Thread Eduardo A . Bustamante López
> But I am wondering if there is a walkaround to deal with errors in > <(). The ideal behavior should be that if there is a error in <(), > then we should not consider commandA is executed correctly even if its > return status is 0. Again, address your questions to help-bash. you can use: Command

Re: Where is the usage "for x in a b c; { echo $x; }" documented in bash man page?

2015-03-07 Thread Eduardo A . Bustamante López
On Sat, Mar 07, 2015 at 05:10:51PM -0600, Peng Yu wrote: > Hi, > > The following code works in bash. > > for x in a b c; { echo $x; } > > But I only find the following in bash man page. Does anybody know > where the above usage is documented? Thanks. > > "for name [ [ in [ word ... ] ] ; ] do l

Re: The correct way to use "for" without polluting the environment

2015-03-07 Thread Eduardo A . Bustamante López
On Sat, Mar 07, 2015 at 04:31:54PM -0600, Peng Yu wrote: > Hi, I use unset to remove x from the environment once the for loop is > finished. Is it the best way to do in bash? Thanks. First, use the help-bash mailing list for this kind of queries. Second, unless you used 'export x', then the 'x' p

How to deal with errors in <()?

2015-03-07 Thread Peng Yu
Hi, http://mywiki.wooledge.org/ProcessSubstitution The above webpage says the following. commandA <(commandB; [commandB's exit code is available here from $?]) [commandB's exit code cannot be obtained from here. $? holds commandA's exit code] But I am wondering if there is a walkaround to deal

Where is the usage "for x in a b c; { echo $x; }" documented in bash man page?

2015-03-07 Thread Peng Yu
Hi, The following code works in bash. for x in a b c; { echo $x; } But I only find the following in bash man page. Does anybody know where the above usage is documented? Thanks. "for name [ [ in [ word ... ] ] ; ] do list ; done" -- Regards, Peng

Re: The correct way to use "for" without polluting the environment

2015-03-07 Thread Alan Wild
I'm really curious to see if anyone else offers better ideas, but the ways I've done this are 1) exactly what you propose. 2) use a subshell (parantheses): $ ( for x in a b c; { echo $x; } ) a b c $ typeset -p x bash: typeset: x: not found 3) use a function and declare x local to the function

The correct way to use "for" without polluting the environment

2015-03-07 Thread Peng Yu
Hi, I use unset to remove x from the environment once the for loop is finished. Is it the best way to do in bash? Thanks. for x in a b c do echo "$x" done unset x -- Regards, Peng