Re: arithmetic problem, incorrect return code with ((var++)) when var is 0 before operation

2017-04-22 Thread Eduardo Bustamante
On Sat, Apr 22, 2017 at 12:49 PM, Andrew McGlashan wrote: [...] > > The return code from ((i++)) operation is different when i has an > initial value of 0. This is not a bug. Please read the Bash reference manual section on conditional constructs: https://www.gnu.org/software/bash/manual/bash.h

arithmetic problem, incorrect return code with ((var++)) when var is 0 before operation

2017-04-22 Thread Andrew McGlashan
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE

Re: Issus with popd and pushd

2017-04-22 Thread Pete Smith
Thanks I was being a bit dense, didn't realize that the format you gave causes the commands to run in the parent shell. It works as it should! -Pete On Fri, Apr 21, 2017 at 10:52 AM, Chet Ramey wrote: > On 4/21/17 1:36 PM, Chet Ramey wrote: > > > I think the key takeaway is that this is trivi