Re: Re: Problem when using variable assignment, backticks in shell script

2006-09-01 Thread Christopher Faylor
On Fri, Sep 01, 2006 at 09:22:53AM +0200, CARTER Alan wrote: >>Whether you typed it yourself or not, those type of disclaimers are >>actually not allowed in mail to mailing lists at this site: > >>http://sourceware.org/lists.html > >OK. I can't post. My mistake was attempting to make a suggestion

RE: Re: Problem when using variable assignment, backticks in shell script

2006-09-01 Thread CARTER Alan
> Whether you typed it yourself or not, those type of disclaimers are actually not allowed in mail to mailing lists at this site: > http://sourceware.org/lists.html OK. I can't post. My mistake was attempting to make a suggestion to a person asking for help - which is more than you did. What a wa

Re: Problem when using variable assignment, backticks in shell script

2006-08-31 Thread Jim Easton
Hi, Mon, 28 Aug 2006 Russell Silva wrote: > I am having a problem using Cygwin, variable assignment, and backticks > when shell scripting. Occasionally, variables assigned using a > backticked expression are not properly assigned; they are left empty. > The problem appears to be non-deterministic

Re: FW: Re: Problem when using variable assignment, backticks in shell script

2006-08-31 Thread Christopher Faylor
On Thu, Aug 31, 2006 at 11:56:31AM -0400, Charli Li wrote: >cgf wrote: >>On Thu, Aug 31, 2006 at 05:04:08PM +0200, CARTER Alan wrote: Hmm... 9 lines of content, 10 of disclaimer... *sip!* Eew, and the disclaimer isn't even line-wrapped... >>> (How come PCYMTNILOAUD is not on the OLOCA

FW: Re: Problem when using variable assignment, backticks in shell script

2006-08-31 Thread Charli Li
cgf wrote: >On Thu, Aug 31, 2006 at 05:04:08PM +0200, CARTER Alan wrote: >>>Hmm... 9 lines of content, 10 of disclaimer... *sip!* Eew, and the >>>disclaimer isn't even line-wrapped... >> >>>(How come PCYMTNILOAUD is not on the OLOCA yet? ;-)) >> >>Ah. You think I typed that, myself? I didn't.

Re: Re: Problem when using variable assignment, backticks in shell script

2006-08-31 Thread Christopher Faylor
On Thu, Aug 31, 2006 at 05:04:08PM +0200, CARTER Alan wrote: >>Hmm... 9 lines of content, 10 of disclaimer... *sip!* Eew, and the >>disclaimer isn't even line-wrapped... > >>(How come PCYMTNILOAUD is not on the OLOCA yet? ;-)) > >Ah. You think I typed that, myself? I didn't. It was automatica

RE: Re: Problem when using variable assignment, backticks in shell script

2006-08-31 Thread CARTER Alan
> Hmm... 9 lines of content, 10 of disclaimer... *sip!* > Eew, and the disclaimer isn't even line-wrapped... > (How come PCYMTNILOAUD is not on the OLOCA yet? ;-)) Ah. You think I typed that, myself? I didn't. It was automatically appended by the local email system. Many corporate email systems

Re: Problem when using variable assignment, backticks in shell script

2006-08-31 Thread mwoehlke
CARTER Alan wrote: In any case, it's pretty weird that bash randomly fails to spawn child processes! It wreaks havoc on a number of my scripts. Thought: Silent failure to spawn used to happen on some UNIX boxen when the process table was full (or one slot remained and user != root). Might some

RE: Problem when using variable assignment, backticks in shell script

2006-08-31 Thread CARTER Alan
> In any case, it's pretty weird that bash randomly fails to spawn child processes! It wreaks havoc on a number of my scripts. Thought: Silent failure to spawn used to happen on some UNIX boxen when the process table was full (or one slot remained and user != root). Might something like this be c

Re: Problem when using variable assignment, backticks in shell script

2006-08-30 Thread Cary Jamison
Dave Korn wrote: > On 30 August 2006 20:50, Silva, Russell wrote: > >> I've tried to reproduce the problem on a different computer without >> success. So, the problem appears to be specific to this particular >> machine. > > I've tried it with latest CVS. Still can't reproduce. > >> Are there an

RE: Problem when using variable assignment, backticks in shell script

2006-08-30 Thread Dave Korn
On 30 August 2006 20:50, Silva, Russell wrote: > I've tried to reproduce the problem on a different computer without > success. So, the problem appears to be specific to this particular > machine. I've tried it with latest CVS. Still can't reproduce. > Are there any characteristics of my mac

RE: Problem when using variable assignment, backticks in shell script

2006-08-30 Thread Silva, Russell
ild processes! It wreaks havoc on a number of my scripts. Regards, Russell RE: Problem when using variable assignment, backticks in shell script * From: "Dave Korn" * To: * Date: Tue, 29 Aug 2006 22:51:58 +0100 * Subject: RE: Problem when using variable assignment, back

Re: Problem when using variable assignment, backticks in shell script

2006-08-29 Thread Igor Peshansky
Ugh, top-posting... Reformatted. On Tue, 29 Aug 2006, Tristen Hayfield wrote: > Brian Dessent wrote: > > "Silva, Russell" wrote: > > > > > x=`/usr/bin/cat < temp`; > > > > I don't know what is causing your problem. I ran your testcase several > > times and never saw a failure, but from your d

RE: Problem when using variable assignment, backticks in shell script

2006-08-29 Thread Dave Korn
On 29 August 2006 22:00, Silva, Russell wrote: > Hi Dave, > > I tried this; it's an excellent point but isn't the problem. I > experimented using your script version and $? is indeed set to 0 when > the backtick output is empty. > > I'd be happy to hear more suggestions. I also need to try thi

Re: Problem when using variable assignment, backticks in shell script

2006-08-29 Thread Tristen Hayfield
One may also do: read x < temp in bash Tristen Brian Dessent wrote: "Silva, Russell" wrote: x=`/usr/bin/cat < temp`; I don't know what is causing your problem. I ran your testcase several times and never saw a failure, but from your description it seems like it's the kind of thing that m

Re: Problem when using variable assignment, backticks in shell script

2006-08-29 Thread Brian Dessent
"Silva, Russell" wrote: > x=`/usr/bin/cat < temp`; I don't know what is causing your problem. I ran your testcase several times and never saw a failure, but from your description it seems like it's the kind of thing that might occur very rarely. My only suggestion is that if your true desire

RE: Problem when using variable assignment, backticks in shell script

2006-08-29 Thread Silva, Russell
Hi Dave, I tried this; it's an excellent point but isn't the problem. I experimented using your script version and $? is indeed set to 0 when the backtick output is empty. I'd be happy to hear more suggestions. I also need to try this on another machine (my home box, perhaps) to see if it's re

RE: Problem when using variable assignment, backticks in shell script

2006-08-29 Thread Dave Korn
On 29 August 2006 17:04, Silva, Russell wrote: > The value of $? is always 0 when this problem occurs, even if it should > be a non-zero value. For instance: > > > #!/bin/bash > # make 1000 attempts to reproduce the bug > for i in `seq 1 1000` > do > # ls should return incorrect usage = erro

RE: Problem when using variable assignment, backticks in shell script

2006-08-29 Thread Silva, Russell
$ ls -asdfghjkl ls: invalid option -- j Try `ls --help' for more information. $ echo $? 2 Regards, Russell Silva -Original Message- From: Igor Peshansky [mailto:[EMAIL PROTECTED] Sent: Monday, August 28, 2006 5:25 PM To: Silva, Russell Cc: cygwin@cygwin.com Subject: Re: Problem when

Re: Problem when using variable assignment, backticks in shell script

2006-08-28 Thread Igor Peshansky
On Mon, 28 Aug 2006, Silva, Russell wrote: > I am having a problem using Cygwin, variable assignment, and backticks > when shell scripting. Occasionally, variables assigned using a > backticked expression are not properly assigned; they are left empty. > The problem appears to be non-deterministi