Subject: Re: (latest install from site) cygwin1.dll 1.3.22-dontuse-21 --bash buggy behaviours under windows 2000
From: "sandeep" <[email-masked]>
To: "Andrew Markebo" <[email-masked]>
Cc: <[email-masked]>
Date: Thu, 7 Aug 2003 14:17:34 +0530

* First line of script is
#! /bin/bash

* my login shell is bash
* problems show themselves irrespective of how i invoke the script - whether
"./scriptname" or "bash scriptname"

* All the mentioned problems are observed in one single script that's around
1500 lines

----- Original Message -----
From: "Andrew Markebo" <[email-masked]>

> Just a quick question, how do you fire away the script/s? do you use a
> #!/bin/sh or you run "bash script" in your shell/whatever?
>
>           /A
>
> / "sandeep" <[email-masked]> wrote:
> | 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
> |
> |
>
> --
>  The Devil is so clever that he makes you think he doesn't exist.
>
>     Please note, new email, @telia.com -> @comhem.se
>

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