www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/08/07/04:24:45

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <001c01c35cbe$cbbc9020$2564a8c0@blackmagic>
From: "sandeep" <sandeep AT codito DOT com>
To: <cygwin AT cygwin DOT com>
Subject: (latest install from site) cygwin1.dll 1.3.22-dontuse-21 -- bash buggy behaviours under windows 2000
Date: Thu, 7 Aug 2003 14:05:02 +0530
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Note-from-DJ: This may be spam

hello,

I have come across some problems with cygwin (they repeat even with the latest
cygwin i installed two days back) while working on windows 2000.

cygwin1.dll Product Version is 1.3.22-dontuse-21

bash --version shows
GNU bash, version 2.05b.0(9)-release (i686-pc-cygwin)
Copyright (C) 2002 Free Software Foundation, Inc.

The problems are --

[1]  for i in list-of-file-name
      do
            echo ............. $i ................
            cat $i
      done

Sometimes the order of echoed statement and corresponding file content gets
changed and I end up getting output like

.............. file20 ......................
.............. file21 ......................
.............. file22 ......................
contents of file20
contents of file21
contents of file22

[2] following problem is more weird . I have a sequence of two consecutive
statements in a bash-script

sed -e 'sed-expression' file1 > file2
mv file2 file1

quite many times in a run of script 'mv' cribs about *file2 not existing*
my understanding of bash goes as -- file2 will be created/zeroed-out first and
then sed will be processed, so file2 should exist before mv executes.
as a note :- file2 doesn't exist before sed (manipulations involving file2 are
only in this place in script)

I also tried putting an && b/w two statements to ensure 'mv' doesn't happen
before sed is successfully done. that also didn't eliminate the problem.

[3] At times some of the echo-ed statements don't find place in redirected
output file (I have no idea if this behaviour repeats on console output too).

situation is like --

cp basefile tempfile
add-required-statements >> tempfile

add-required-statements is a bash shell function that echoes many statements to
be put in tempfile.
what i have observed is - at times, initial 3-4 echo-ed statements don't find
place in tempfile, otherwise things are okay.

problem used to come even earlier, when all those statements were appended
like --

cp basefile tempfile
echo "......" >> tempfile
........
echo "...." >> tempfile

i went for some reorganisation of script to reduce number of ">> tempfile"
checking if it eliminated the problem.

Any clue to what's happening and why it could be happening, is welcome. Are
these problems to do with cygwin bash or with windows 2000?

sandeep



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019