This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: A dumb CR/LF question


Sigh... sorry, I didn't think the cygcheck output was needed 'cause I
figured I was being a total doofus and missing something obvious :-\ I've
appended it here.

I simply inserted a "tr -s '\r'" after the sort to fix up the output. That
got me going to where I had usable output - unfortunately I started
experiencing very strange behaviour from the shell. The script that I was
running to test the output began randomly exiting completely (i.e. the
window would suddenly close) for no apparent reason - and redirecting the
output of the program to a file kept the random exits from occurring - but
it also produced no output!

Switching from the 9/29 snapshot file back to the version of cygwin1.dll
that came with the install got rid of the random exits.

I'm trying to port an existing build that runs under cmd.exe but uses the
MKS toolkit utilities. I combine a couple of text files to produce a master
list of files that should not be processed as part of the recursive build. I
use 'ls' to create a list of all the directories. Then I do a 'join' on the
files to get the list of directories that should be processed. I've
simplified things down to:

export DIRS=dirs
export XDIRS=xdirs
export TMPDIRS=tdirs

if [ -t './build' ]
then
	if [ -r './build/makefile.template' ]
	then
		ls -l | grep ^d | awk '{print $NF }' | sort | uniq >$DIRS
		cat $DAS_BASE/build/always.excluded.directories >$TMPDIRS
		cat ./build/excluded.directories >>$TMPDIRS
		cat $TMPDIRS | sort | tr -s '\r' >$XDIRS
		join -v1 $DIRS $XDIRS >build.dirs
		cat build.dirs
	fi
fi

After tossing in the "tr -s '\r'" to get rid of the extra CR in the CR CR LF
line endings, things work just fine.

I assume that I'm just ignorant of how file modes are handled when piping or
something. In any case, if someone is trying to troubleshoot the random
exits, this script definitely encounters them frequently with the 9/29
snapshot dll. Roughly 75% of the time the bash window it's running in will
just close when the script is run using '. ./testscript.sh'

Thanks a bunch for taking the time! I appreciate it.

Regards,

  Dan


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Sat Oct  7 12:12:32 2000

WinNT Ver 4.0 build 1381 Service Pack 6

Path:	/usr/local/bin
	/usr/bin
	/usr/bin
	/cygdrive/e/mksnt
	/cygdrive/c/WINNT/system32
	/cygdrive/c/WINNT
	/cygdrive/e/PROGRA~1/Symantec/PCANYW~1
	/cygdrive/e/PROGRA~1/NTRESKIT
	/cygdrive/e/PROGRA~1/NTRESKIT/Perl
	/cygdrive/e/bc5/BIN
	/cygdrive/c/IMPASSE/winbin
	/cygdrive/c/IMPASSE/dosbin
	/awi/bin
	/cygdrive/e/vim-5.6
	/cygdrive/e/wc/BINNT
	/cygdrive/e/wc/BINW

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

HOME = `/haynes'
MAKE_MODE = `unix'
PWD = `/haynes'
USER = `haynes'

!C: = `C:\WINNT\PROFILES\haynes\DESKTOP'
!F: = `F:\cygwin\bin'
AWI_RPK_DEST = `/tmp'
CC = `bcc32'
COMMON_WINBIN = `\\fringe\das\common\winbin'
COMPUTERNAME = `IMPASSE'
COMSPEC = `C:\WINNT\system32\cmd.exe'
CVSROOT = `:pserver:haynes@fringe:e:\Repository'
DADU = `c:\IMPASSE\rc'
DIRCMD = `/ogn'
EDPATH = `e:\wc\EDDAT'
HOMEDRIVE = `C:'
HOMEPATH = `\'
HOSTNAME = `IMPASSE'
HOSTTYPE = `i586'
INCLUDE = `e:\wc\H;e:\wc\H\NT'
LOGONSERVER = `\\IMPASSE'
MACHTYPE = `i586-pc-cygwin'
NTRESKIT = `E:\program files\NTRESKIT'
NUMBER_OF_PROCESSORS = `1'
OLDPWD = `/usr/bin'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
OS = `Windows_NT'
OSTYPE = `cygwin'
PATHEXT = `.COM;.EXE;.BAT;.CMD'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 5 Stepping 2, GenuineIntel'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0502'
PROMPT = `$P$G'
PS1 = `]0;\w
\u@\h \w
$ '
ROOTDIR = `e:/'
SHELL = `c:\winnt\system32\cmd.exe'
SHLVL = `1'
SPCH_DIR = `e:/program files/ViaVoice/Temp'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINNT'
TEMP = `/tmp'
TERM = `cygwin'
USERDOMAIN = `IMPASSE'
USERNAME = `haynes'
USERPROFILE = `C:\WINNT\Profiles\haynes'
USR_BIN_PATH = `c:\impasse\winbin'
USR_CYGNUS = `f:/cygwin'
USR_CYGWIN_HOST = `h-i686-cygwin'
USR_DRIVE = `f:'
USR_GNUPRO = `f:/cygnus/gnupro-98r2'
WATCOM = `e:\wc'
WINDIR = `C:\WINNT'
_ = `/usr/bin/cygcheck'
TZ = `MST7MDT6,M4.1.0/2,M10.5.0/2'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000020
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `f:\cygwin'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/awi
  (default) = `f:\awi'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/code
  (default) = `f:\code'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/das
  (default) = `f:\das'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/repository
  (default) = `o:'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/scar
  (default) = `s:'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/tmp
  (default) = `f:\tmp'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `f:/cygwin/bin'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `f:/cygwin/lib'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygnus gnupro-98r2 m68k-coff
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygnus gnupro-98r2
m68k-coff\gnupro-98r2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\00
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\01
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\02
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\03
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\04
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\05
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\06
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\07
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\08
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\09
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0E
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0F
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\10
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\11
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\12
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\13
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\14
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\15
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\16
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\17
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\18
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\19
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32\m68k-coff
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus
Solutions\GNUPro\i586-cygwin32\m68k-coff\gnupro-98r2
  (default) = `f:\cygnus\gnupro-98r2'
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\Cygnus gnupro-98r2 m68k-coff
  (default) = `f:\cygnus\gnupro-98r2'
   = `f:\cygnus\gnupro-98r2\Cygnus gnupro-98r2 m68k-coff'
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cygnu
s gnupro-98r2 m68k-coff
  (default) = `C:\WINNT\IsUninst.exe -ff:\cygnus\gnupro-98r2\Uninst.isu'
  DisplayName = `Cygnus gnupro-98r2 m68k-coff'

a:  fd           N/A    N/A
c:  hd  FAT     1545Mb  49% CP    UN           IMPASSE
d:  hd  FAT     1545Mb   2% CP    UN           GAMES
e:  hd  NTFS    3090Mb  39% CP CS UN PA FC     Apps
f:  hd  NTFS    6181Mb  82% CP CS UN PA FC     User
g:  net NTFS    7718Mb  82% CP CS UN PA FC     Backups
h:  net NTFS    6698Mb  54% CP CS UN PA FC     DAS
i:  net FAT     2047Mb  45% CP    UN           SYSTEM
j:  net NTFS   19532Mb  78% CP CS UN PA FC     BIG
l:  net NTFS    3868Mb  47% CP CS UN PA FC     User
m:  net FAT     2044Mb  73% CP    UN
n:  net NTFS    7726Mb  64% CP CS UN PA FC     Archives
o:  net NTFS    6698Mb  54% CP CS UN PA FC     DAS
x:  cd  CDFS     641Mb 100%    CS UN           001007_0846
y:  cd  CDFS       0Mb -2147483548%    CS              Audio CD

f:\cygwin\bin  /usr/bin  user    textmode
f:\cygwin\lib  /usr/lib  user    textmode
f:\cygwin  /        user    textmode
f:\code  /code    user    textmode
f:\awi  /awi     user    textmode
f:\das  /das     user    textmode
f:\tmp  /tmp     user    textmode
o:    /repository  user    textmode
s:    /scar    user    textmode

Found: f:\cygwin\bin\bash.exe
Found: f:\cygwin\bin\cat.exe
Found: e:\mksnt\cat.exe
Warning: f:\cygwin\bin\cat.exe hides e:\mksnt\cat.exe
Found: e:\PROGRA~1\NTRESKIT\cat.exe
Warning: f:\cygwin\bin\cat.exe hides e:\PROGRA~1\NTRESKIT\cat.exe
Found: c:\IMPASSE\winbin\cat.exe
Warning: f:\cygwin\bin\cat.exe hides c:\IMPASSE\winbin\cat.exe
Found: c:\IMPASSE\dosbin\cat.exe
Warning: f:\cygwin\bin\cat.exe hides c:\IMPASSE\dosbin\cat.exe
Found: f:\cygwin\bin\cpp.exe
Found: e:\bc5\BIN\cpp.exe
Warning: f:\cygwin\bin\cpp.exe hides e:\bc5\BIN\cpp.exe
Found: c:\IMPASSE\dosbin\cpp.exe
Warning: f:\cygwin\bin\cpp.exe hides c:\IMPASSE\dosbin\cpp.exe
Found: f:\cygwin\bin\find.exe
Found: e:\mksnt\find.exe
Warning: f:\cygwin\bin\find.exe hides e:\mksnt\find.exe
Found: c:\IMPASSE\winbin\find.exe
Warning: f:\cygwin\bin\find.exe hides c:\IMPASSE\winbin\find.exe
Found: c:\IMPASSE\dosbin\find.exe
Warning: f:\cygwin\bin\find.exe hides c:\IMPASSE\dosbin\find.exe
Found: f:\cygwin\bin\gcc.exe
Found: f:\cygwin\bin\gdb.exe
Found: f:\cygwin\bin\ld.exe
Found: f:\cygwin\bin\ls.exe
Found: e:\mksnt\ls.exe
Warning: f:\cygwin\bin\ls.exe hides e:\mksnt\ls.exe
Found: e:\PROGRA~1\NTRESKIT\ls.exe
Warning: f:\cygwin\bin\ls.exe hides e:\PROGRA~1\NTRESKIT\ls.exe
Found: c:\IMPASSE\winbin\ls.exe
Warning: f:\cygwin\bin\ls.exe hides c:\IMPASSE\winbin\ls.exe
Found: c:\IMPASSE\dosbin\ls.exe
Warning: f:\cygwin\bin\ls.exe hides c:\IMPASSE\dosbin\ls.exe
Found: f:\cygwin\bin\make.exe
Found: e:\bc5\BIN\make.exe
Warning: f:\cygwin\bin\make.exe hides e:\bc5\BIN\make.exe
Found: f:\cygwin\bin\sh.exe
Found: e:\mksnt\sh.exe
Warning: f:\cygwin\bin\sh.exe hides e:\mksnt\sh.exe
Found: c:\IMPASSE\winbin\sh.exe
Warning: f:\cygwin\bin\sh.exe hides c:\IMPASSE\winbin\sh.exe
Found: c:\IMPASSE\dosbin\sh.exe
Warning: f:\cygwin\bin\sh.exe hides c:\IMPASSE\dosbin\sh.exe
Found: \bin\sh.exe
Warning: f:\cygwin\bin\sh.exe hides \bin\sh.exe

   83k 2000/06/11 f:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2000/6/10 21:34
   35k 2000/06/11 f:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2000/6/10 21:34
  402k 2000/06/11 f:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2000/6/10 21:30
    5k 2000/06/11 f:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2000/06/11 f:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2000/6/10 21:30
  639k 2000/06/11 f:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2000/6/10 21:34
  586k 2000/10/07 f:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2000/8/3 18:53
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 4
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        api major: 0
        api minor: 26
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        build date: Thu Aug 3 20:53:46 EDT 2000
        CVS tag: cygwin-1-1-4
        shared id: cygwin1S3

  386k 1999/06/08 f:\awi\bin\cygwinb19.dll - os=4.0 img=1.0 sys=4.0
                  "cygwinb19.dll" v0.0 ts=1998/2/25 3:22
Use -h to see help about each section

> -----Original Message-----
> From: cygwin-owner@sources.redhat.com
> [mailto:cygwin-owner@sources.redhat.com]On Behalf Of Larry Hall (RFK
> Partners, Inc)
> Sent: Saturday, October 07, 2000 11:20 AM
> To: Dan Haynes; Cygwin
> Subject: Re: A dumb CR/LF question
>
>
> At 11:57 AM 10/7/2000, Dan Haynes wrote:
> >I feel really dumb having to ask this - I searched the archives and FAQ,
> >read a ton of posts about line endings but didn't find anything
> specifically
> >related to what I'm seeing. I may have just missed it because of
> the sheer
> >number of posts to look through. I *thought* I was pretty aware
> of all the
> >differences/issues with line endings and how they are affected by mount
> >types, but I'm confused by this one.
> >
> >I'm using 1.1.4 now, just upgraded from B20.1 which I've been using for a
> >good long while. I did a fresh install from the net about a week
> ago, using
> >all defaults. Now I do a:
> >
> >cat ./build/f1 ./build/f2 | sort >/tmp/f3
> >
> >Passing the output through some utiltities like 'sort' causes
> line endings
> >to be expanded to CR CR LF (two carriage returns and a line feed)
> >
> >All mounts (both Cygwin created and the ones I have created) are
> textmode. I
> >triple checked path and such and all the executables are coming from
> >/usr/bin.
> >
> >If I do:
> >
> >  cat ./build/f1 ./build/f2 >/tmp/f3
> >
> >...the file is created properly with CR LF endings. It's only if
> I pipe it
> >through or process it with some tools (sort, uniq, awk) that it
> acquires the
> >extra CR. If I pipe it through grep, egrep, or expand it gets
> the expected
> >CR LF endings.
> >
> >I tried updating to the 9/29 snapshot cygwin1.dll file, but it still does
> >the same thing.
> >
> >Anyone care ta put a quarter in the clue meter for a dummy? :-p
> A link would
> >be most appreciated. :-)
> >
> >Thanks,
> >
> >   Dan
>
>
>
> How about sending the output of cygcheck -s -v -r?
>
>
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]