Re: Design question(s), re: why use of tmp-files or named-pipes(/dev/fd/N) instead of plain pipes?

2015-10-22 Thread Pierre Gaston
On Thu, Oct 22, 2015 at 5:57 AM, Linda Walsh wrote: > > But only as a pointer to something one can do I/O on. > You can't set any file attributes or metadata on "pipe:[]" It's not a > real file somewhere. > Yes, it's not a regular file, but it not the less true that

Re: Bash-4.4-beta available for FTP

2015-10-22 Thread aixtools
On 2015-10-15 16:23, Chet Ramey wrote: The first beta release of bash-4.4 is now available with the URL ftp://ftp.cwru.edu/pub/bash/bash-4.4-beta.tar.gz First attempt at build on AIX configure warns that bison is not available - good. configure finishes - good make fails immediately

Dynamic variable failure & equiv-const strings compare unequal

2015-10-22 Thread Linda Walsh
Greg Wooledge wrote: Also I think you are completely misrepresenting the dynamic variable scope system that bash uses. Variables are not just global or local. There's an entire stack of them. When you reference a variable (let's say i) inside a function, bash searches up through the

Re: Dynamic variable failure & equiv-const strings compare unequal

2015-10-22 Thread Linda Walsh
Oleg Popov wrote: On Thu, Oct 22, 2015 at 03:01:06AM -0700, Linda Walsh wrote: [cut] I.e. test output was: Case 2 got/Expected: "222" "1\ 222\ .3\ .4" [cut] You didn't initialize the array. By the time you do "parts[1]=222" it's still empty. And in your previous message you tried to

Inconsistency in the handling of variables inside a function when using a tempenv variable

2015-10-22 Thread Eduardo A . Bustamante López
I found this some time ago, but didn't report it because I couldn't come up with a patch: dualbus@hp ~ % for sh in bash mksh zsh ksh93 dash; do $sh -c 't=${KSH_VERSION+typeset}; f() { x=3; ${t:-local} x; echo $x; }; [ "$(f)" = "$(x=4 f)" ]'; echo $sh $?; done bash 1 mksh 0 zsh 0 ksh93 0 dash 0

Re: Dynamic variable failure & equiv-const strings compare unequal

2015-10-22 Thread Chet Ramey
On 10/22/15 8:13 AM, Linda Walsh wrote: > > > Oleg Popov wrote: >> On Thu, Oct 22, 2015 at 03:01:06AM -0700, Linda Walsh wrote: >>> [cut] >>> I.e. test output was: >>> Case 2 got/Expected: >>> "222" >>> "1\ 222\ .3\ .4" >>> [cut] >> >> You didn't initialize the array. By the time you do

Re: Bash crash

2015-10-22 Thread Greg Wooledge
On Thu, Oct 22, 2015 at 02:39:43AM +, Kai Wang X wrote: > The process named "com" launched by script command "com.sh start". Pls refer > to the attached files. It looks easy, doesn't it? It looks like a horrible mish-mash of legacy Bourne shell syntax, edited later by another person using

Re: Dynamic variable failure & equiv-const strings compare unequal

2015-10-22 Thread Linda Walsh
Oleg Popov wrote: $(...) is a subshell. Variables cannot be passed back from a subshell, no matter how and where they are declared. --- Um... oh.. in testor, still calling that way. I missed that. This is even more annoying for passing back results than I thought. Grrr.

Re: Dynamic variable failure & equiv-const strings compare unequal

2015-10-22 Thread Oleg Popov
On Thu, Oct 22, 2015 at 03:01:06AM -0700, Linda Walsh wrote: > [cut] > I.e. test output was: > Case 2 got/Expected: > "222" > "1\ 222\ .3\ .4" > [cut] You didn't initialize the array. By the time you do "parts[1]=222" it's still empty. And in your previous message you tried to initialize it in

Re: Dynamic variable failure & equiv-const strings compare unequal

2015-10-22 Thread Oleg Popov
On Thu, Oct 22, 2015 at 05:13:45AM -0700, Linda Walsh wrote: > Oleg Popov wrote: > > On Thu, Oct 22, 2015 at 03:01:06AM -0700, Linda Walsh wrote: > >> [cut] > >> I.e. test output was: > >> Case 2 got/Expected: > >> "222" > >> "1\ 222\ .3\ .4" > >> [cut] > > > > You didn't initialize the array. By

RE: Bash crash

2015-10-22 Thread Kai Wang X
Hi Piotr, Actually when process com is not needed, "com.sh" will not be launched instead of commenting one line. I have never tried that. From the coredump log of 4.3, seems it crashed before line 187. (crashed at 114). Thank you. -Original Message- From: Piotr Grzybowski

Re: Bash crash

2015-10-22 Thread Piotr Grzybowski
do I understand correctly, that when you comment the line 187 the issue is not existent? cheers, pg On Thu, Oct 22, 2015 at 4:39 AM, Kai Wang X wrote: > Hi all, > > Thank you all! > > The issue happens since we added a new process launched by a bash script. > Before