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

2006-08-30 Thread Silva, Russell
ticks in shell script 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. > >

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

2006-08-29 Thread Silva, Russell
to see if it's reproducible on other machines. Have you tried any of these scripts to see if it's a problem general to Cygwin users? Regards, Russell On 29 August 2006 17:04, Silva, Russell wrote: > The value of $? is always 0 when thi

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

Problem when using variable assignment, backticks in shell script

2006-08-28 Thread Silva, Russell
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. For instance, take this script: #!/bin/bash #