X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
References:  <mn.13aa7d74a3db2d48.51129@pbs.org> <46116207.8060009@cygwin.com> 	 <mn.13cd7d74d8141649.51129@pbs.org> <5abc24640704021326p2bfbcc0che61f4aec02964ec1@mail.gmail.com> <46116C70.8030508@cygwin.com>  <mn.1a5e7d74f9a48215.51129@pbs.org>
Subject: RE: Varibles not working in do loop...
Date: Tue, 3 Apr 2007 15:38:38 +0100
Message-ID: <016001c775fd$c44d3b80$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To:  <mn.1a5e7d74f9a48215.51129@pbs.org>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 03 April 2007 15:07, Kevin Markle wrote:

> Larry Hall (Cygwin) formulated on Monday :
>> Andrew Louie wrote:
>>> On 4/2/07, Kevin Markle  wrote:
>>>> Larry Hall (Cygwin) expressed precisely :
>>>>> Kevin Markle wrote:
>>> 
>>>> What does this mean please and or would you send me your copy that works
>>>> fine? "$LOG" == > "".  In these cases, the "hang" is 'cat' waiting for
>>>> input from the command
>>>>> line.
>>> 
>>> I think he means that in the line:
>>> 
>>>> UPDATES_NEEDED=`cat $LOG | grep "updates detected" | tail -1`
>>> 
>>> cat $LOG... will hang if $LOG == "" because "cat" is waiting for input.
>>> 
>> 
>> Precisely.
> 
> That helps but my problem is the line above where it get the value for
> LOG for whatever reason doesn't get the value of LOG in the for loop
> but can outside of the loop... :o)

  You mean this line?

LOG=`ls -al $DIR | grep $t | grep WINDOWS`

  You're listing the contents of the directory, trying to find the one line
that contains the name of the file ($t) you're currently considering.  Then
you're using grep a second time to only select (from that one line) any lines
that contain the text 'WINDOWS'.  Presumably none of the files in
1group_1a_dev_clientlist.out have the word "WINDOWS" in their name.

  What are you *trying* to do with that second grep?

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

