* RE: CR/LF and read is shell scripts
@ 2000-08-22 10:54 Earnie Boyd
0 siblings, 0 replies; 11+ messages in thread
From: Earnie Boyd @ 2000-08-22 10:54 UTC (permalink / raw)
To: Fifer, Eric, cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 688 bytes --]
--- "Fifer, Eric" <EFifer@sanwaint.com> wrote:
>
> I said --binary/-B is now in the latest version of cat, look at the source.
>
Will do.
Thanks,
=====
---
Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
__Cygwin: POSIX on Windows__
Cygwin Newbies: < http://gw32.freeyellow.com/ >
__Minimalist GNU for Windows__
Mingw32 List: < http://www.egroups.com/group/mingw32/ >
Mingw Home: < http://www.mingw.org/ >
__________________________________________________
Do You Yahoo!?
Yahoo! Mail  Free email you can access from anywhere!
http://mail.yahoo.com/
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: CR/LF and read is shell scripts
2000-08-22 10:57 Earnie Boyd
@ 2000-08-22 14:34 ` Larry Hall (RFK Partners, Inc)
0 siblings, 0 replies; 11+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2000-08-22 14:34 UTC (permalink / raw)
To: Earnie Boyd; +Cc: cygwin@sourceware.cygnus.com
At 01:57 PM 8/22/2000, Earnie Boyd wrote:
>--- "Larry Hall (RFK Partners, Inc)" <lhall@rfk.com> wrote:
> >
> > If you want my opinion, cat under Cygwin should open files using the MS
> > text mode option (which reads text or binary files properly) and write
> > it as the target file system or pipe suggests by default. The flags you
> > suggest are fine options. Of course, they should work on files and
> > stdin/stdout in the same way.
> >
>
>Thanks, I did as for comments which of course include opinions. I want to
>point out though that processing binary files in text mode doesn't work.
>You'll not get all of the data from the binary file.
Right, if the file contains ^Z. What's the alternative?
Implement some of the text semantics to support text mode processing?
(should we move this discussion to another forum/off-line?)
Larry Hall lhall@rfk.com
RFK Partners, Inc. http://www.rfk.com
118 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: CR/LF and read is shell scripts
2000-08-22 8:58 Earnie Boyd
@ 2000-08-22 11:30 ` Larry Hall (RFK Partners, Inc)
0 siblings, 0 replies; 11+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2000-08-22 11:30 UTC (permalink / raw)
To: Earnie Boyd, Fifer, Eric,
'Eirik_Nordbrøden',
cygwin@sourceware.cygnus.com
At 11:58 AM 8/22/2000, Earnie Boyd wrote:
>--- "Fifer, Eric" <EFifer@sanwaint.com> wrote:
> >
> > >Anyone that has got an idea?
> >
> > Try something like 'sed -n p' instead of 'cat'.
> >
> > The cat currently included with cygwin does not
> > work correctly on text mounts. See my previous
> > email for details.
> >
>
>Let me see if IIRC. You, Eric Fifer, had said that cat is forcing binary mode
>file processing regardless of the text/binary mode default settings. Cat,
>IIRC, comes from the textutils package. This implies that cat is a text
>utility and processing of files should default to text mode processing.
>
>IIRC, you had also suggested a switch --binmode for processing binary files
>with cat. I believe that this should be the case. So given this cat should be
>changed to:
>
>Process stdin in text mode and stdout in binary mode.
>Process stdin and stdout in binary mode if --binmode is given.
>Process stdin and stdout in text mode if --textmode is given.
>Process stdin in binary if --binmode-in is given.
>Process stdout in text mode if --textmode-out is given.
>The switch --textmode-in and --binmode-out should also be supported.
>
>Comments?
>
>Cheers,
>
>=====
>---
> Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
> __Cygwin: POSIX on Windows__
If you want my opinion, cat under Cygwin should open files using the MS
text mode option (which reads text or binary files properly) and write
it as the target file system or pipe suggests by default. The flags you
suggest are fine options. Of course, they should work on files and
stdin/stdout in the same way.
Larry Hall lhall@rfk.com
RFK Partners, Inc. http://www.rfk.com
118 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: CR/LF and read is shell scripts
@ 2000-08-22 10:57 Earnie Boyd
2000-08-22 14:34 ` Larry Hall (RFK Partners, Inc)
0 siblings, 1 reply; 11+ messages in thread
From: Earnie Boyd @ 2000-08-22 10:57 UTC (permalink / raw)
To: Larry Hall (RFK Partners, Inc); +Cc: cygwin users
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]
--- "Larry Hall (RFK Partners, Inc)" <lhall@rfk.com> wrote:
>
> If you want my opinion, cat under Cygwin should open files using the MS
> text mode option (which reads text or binary files properly) and write
> it as the target file system or pipe suggests by default. The flags you
> suggest are fine options. Of course, they should work on files and
> stdin/stdout in the same way.
>
Thanks, I did as for comments which of course include opinions. I want to
point out though that processing binary files in text mode doesn't work.
You'll not get all of the data from the binary file.
Cheers,
=====
---
Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
__Cygwin: POSIX on Windows__
Cygwin Newbies: < http://gw32.freeyellow.com/ >
__Minimalist GNU for Windows__
Mingw32 List: < http://www.egroups.com/group/mingw32/ >
Mingw Home: < http://www.mingw.org/ >
__________________________________________________
Do You Yahoo!?
Yahoo! Mail  Free email you can access from anywhere!
http://mail.yahoo.com/
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: CR/LF and read is shell scripts
@ 2000-08-22 9:35 Fifer, Eric
0 siblings, 0 replies; 11+ messages in thread
From: Fifer, Eric @ 2000-08-22 9:35 UTC (permalink / raw)
To: cygwin
Earnie Boyd wrote:
>Let me see if IIRC. You, Eric Fifer, had said that cat is forcing binary
mode
>file processing regardless of the text/binary mode default settings.
Yes, see textutils-2.0/src/cat.c around line 650:
/* We always read and write in BINARY mode, since this is the
best way to copy the files verbatim. Exceptions are when
they request line numbering, squeezing of empty lines or
marking lines' ends: then we use text I/O, because otherwise
-b, -s and -E would surprise users on DOS/Windows where a line
with only CR-LF is an empty line.
>Cat, IIRC, comes from the textutils package. This implies that cat is a
text
>utility and processing of files should default to text mode processing.
This is historical usage. The usage of `cat` is pervasive, and now
simple things like this fail if foo is on a text mount:
x=hello
echo $x >foo
y=`cat foo`
if [ "$x" != "$y" ]; then echo not equal; fi
>IIRC, you had also suggested a switch --binmode for processing binary files
>with cat.
I said --binary/-B is now in the latest version of cat, look at the source.
>I believe that this should be the case. So given this cat should be
>changed to:
>
>Process stdin in text mode and stdout in binary mode.
>Process stdin and stdout in binary mode if --binmode is given.
>Process stdin and stdout in text mode if --textmode is given.
>Process stdin in binary if --binmode-in is given.
>Process stdout in text mode if --textmode-out is given.
>The switch --textmode-in and --binmode-out should also be supported.
The default Cygwin behavior for binmode/textmode processing
should be fine. The way cat formerly worked was correct
(I'm actually using my old B20.1 cat to work around this
problem). The current problems were introduced by the upgrade to
textutils-2.0 cat which added some O_BINARY handling for Win32,
and at the same time clobbered the default Cygwin textmode/binmode
processing.
Eric
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: CR/LF and read is shell scripts
@ 2000-08-22 8:58 Earnie Boyd
2000-08-22 11:30 ` Larry Hall (RFK Partners, Inc)
0 siblings, 1 reply; 11+ messages in thread
From: Earnie Boyd @ 2000-08-22 8:58 UTC (permalink / raw)
To: Fifer, Eric, 'Eirik_Nordbrøden', cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1644 bytes --]
--- "Fifer, Eric" <EFifer@sanwaint.com> wrote:
>
> >Anyone that has got an idea?
>
> Try something like 'sed -n p' instead of 'cat'.
>
> The cat currently included with cygwin does not
> work correctly on text mounts. See my previous
> email for details.
>
Let me see if IIRC. You, Eric Fifer, had said that cat is forcing binary mode
file processing regardless of the text/binary mode default settings. Cat,
IIRC, comes from the textutils package. This implies that cat is a text
utility and processing of files should default to text mode processing.
IIRC, you had also suggested a switch --binmode for processing binary files
with cat. I believe that this should be the case. So given this cat should be
changed to:
Process stdin in text mode and stdout in binary mode.
Process stdin and stdout in binary mode if --binmode is given.
Process stdin and stdout in text mode if --textmode is given.
Process stdin in binary if --binmode-in is given.
Process stdout in text mode if --textmode-out is given.
The switch --textmode-in and --binmode-out should also be supported.
Comments?
Cheers,
=====
---
Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
__Cygwin: POSIX on Windows__
Cygwin Newbies: < http://gw32.freeyellow.com/ >
__Minimalist GNU for Windows__
Mingw32 List: < http://www.egroups.com/group/mingw32/ >
Mingw Home: < http://www.mingw.org/ >
__________________________________________________
Do You Yahoo!?
Yahoo! Mail  Free email you can access from anywhere!
http://mail.yahoo.com/
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: CR/LF and read is shell scripts
@ 2000-08-22 8:03 Fifer, Eric
0 siblings, 0 replies; 11+ messages in thread
From: Fifer, Eric @ 2000-08-22 8:03 UTC (permalink / raw)
To: 'Eirik Nordbrøden', cygwin
>Anyone that has got an idea?
Try something like 'sed -n p' instead of 'cat'.
The cat currently included with cygwin does not
work correctly on text mounts. See my previous
email for details.
Eric Fifer
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: CR/LF and read is shell scripts
2000-08-18 5:06 Earnie Boyd
@ 2000-08-22 7:09 ` Eirik Nordbrøden
0 siblings, 0 replies; 11+ messages in thread
From: Eirik Nordbrøden @ 2000-08-22 7:09 UTC (permalink / raw)
To: cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 14103 bytes --]
Hello
I have not bin able to solve the CR/LF problem and the read statement. My version of cygwin is 1.1.4. Included is the failing shell script (the variable last_name contains a CR when I run it). Also included is the output from 'cygcheck -s -r -v'.
Anyone that has got an idea?
--- Script: ---
#!/bin/sh
temp_file=/tmp/names.tmp
rm -f $temp_file
touch $temp_file
echo "Ole Olsen" >> $temp_file
echo "Per Pettersen" >> $temp_file
echo "Hans Hansen" >> $temp_file
cat $temp_file |
while read first_name last_name junk
do
echo "$last_name, $first_name"
done
--- 'cygcheck -s -r -v' ---
Cygnus Win95/NT Configuration Diagnostics
Current System Time: Tue Aug 22 16:01:26 2000
WinNT Ver 4.0 build 1381 Service Pack 5
Path: /usr/bin
/cygdrive/c/winnt/system32
/cygdrive/c/winnt
/cygdrive/c/WINNT/system32
/cygdrive/c/WINNT
/cygdrive/c/program files/emacs/20.3.1/bin
/cygdrive/c/Tools
/cygdrive/c/program files/Sybase/DLL
/cygdrive/c/program files/Sybase/BIN
/cygdrive/c/sybtools/WIN32
/cygdrive/c/sybtools/ASEP
/cygdrive/c/Program Files/jdk1.2.2/bin
/usr/bin
/home/eno/bin
/cygdrive/c/mri
/cygdrive/c/mri/mcc68k
/cygdrive/c/mri/asm68k
.
SysDir: C:\WINNT\System32
WinDir: C:\WINNT
CYGWIN = `"tty"'
HOME = `/cygdrive/c/cygwin/home/eno'
MAKE_MODE = `UNIX'
PWD = `/home/eno'
!C: = `C:\cygwin\home\eno'
ARCOR_SW = `m:\avd33\atn\telettra\335207\code\testnecp'
BTIMS_SW = `m:\avd33\AxxessIT\335408\Code\AsdhSw'
BTIMS_SW_MLSC_INTEGRATION = `m:\avd33\atn\telettra\335208\code\mlscintegration'
BTIMS_SW_SNMP_STEP_2 = `m:\avd33\AxxessIT\335405\Code\SnmpSw'
BTIMS_SW_STEP_2 = `m:\avd33\AxxessIT\335405\Code\BTStep2'
BTIMS_SW_STEP_3 = `m:\avd33\AxxessIT\335408\Code\AsdhSw'
COMPUTERNAME = `ENO'
COMSPEC = `C:\WINNT\system32\cmd.exe'
HOMEDRIVE = `c:'
HOMEPATH = `\'
HOSTNAME = `ENO'
HOSTTYPE = `i586'
LIB = `c:\program files\sybase\LIB'
LOGONSERVER = `\\KYLIE'
MACHTYPE = `i586-pc-cygwin'
MANPATH = `/cygdrive/c/cygwin/usr/man'
MRI_68K_INC = `c:\mri\mcc68k'
NUMBER_OF_PROCESSORS = `1'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
OS = `Windows_NT'
OSTYPE = `cygwin'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 1 Stepping 9, GenuineIntel'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0109'
PROMPT = `$P$G'
PS1 = ``pwd`>'
SHELL = `/bin/sh'
SHLVL = `1'
SYBASE = `c:\program files\Sybase'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINNT'
TEMP = `/cygdrive/c/TEMP'
TERM = `cygwin'
TMP = `/cygdrive/c/TEMP'
USERDOMAIN = `HALDEN'
USERNAME = `ENO'
USERPROFILE = `C:\WINNT\Profiles\eno'
USR_MRI = `c:\mri'
WINDIR = `C:\WINNT'
_ = `/usr/bin/cygcheck'
TZ = `WEST-1WEDT-2,M3.5.0/2,M10.5.0/3'
HKEY_CURRENT_USER\Console\Cygnus
(default) = 0x000000f0
PopupColors = 0x000000f9
ColorTable00 = 0x00000000
ColorTable01 = 0x00800000
ColorTable02 = 0x00008000
ColorTable03 = 0x00808000
ColorTable04 = 0x00000080
ColorTable05 = 0x00800080
ColorTable06 = 0x00008080
ColorTable07 = 0x00c0c0c0
ColorTable08 = 0x00808080
ColorTable09 = 0x00ff0000
ColorTable10 = 0x0000ff00
ColorTable11 = 0x00ffff00
ColorTable12 = 0x000000ff
ColorTable13 = 0x00ff00ff
ColorTable14 = 0x0000ffff
ColorTable15 = 0x00ffffff
InsertMode = 0x00000000
QuickEdit = 0x00000000
FullScreen = 0x00000000
ScreenBufferSize = 0x03e70078
WindowSize = 0x00320078
FontSize = 0x000c0008
FontFamily = 0x00000030
FontWeight = 0x00000190
FaceName = `Terminal'
CursorSize = 0x00000019
HistoryBufferSize = 0x00000032
NumberOfHistoryBuffers = 0x00000004
HistoryNoDup = 0x00000000
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\Program Options
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
(default) = `C:/cygwin'
flags = 0x00000008
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
(default) = `C:/cygwin/bin'
flags = 0x00000008
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
(default) = `C:/cygwin/lib'
flags = 0x00000008
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
a: fd N/A N/A
c: hd NTFS 2445Mb 81% CP CS UN PA FC
d: cd N/A N/A
m: net NTFS 30765Mb 39% CP CS UN PA FC
n: net NTFS 30765Mb 39% CP CS UN PA FC
o: net NTFS 8056Mb 77% CP CS UN PA FC apps
p: net FAT 1177Mb 94% CP UN BACKUP
C:\cygwin\bin /usr/bin system textmode
C:\cygwin\lib /usr/lib system textmode
C:\cygwin / system textmode
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: c:\Tools\make.exe
Warning: C:\cygwin\bin\make.exe hides c:\Tools\make.exe
Found: C:\cygwin\bin\sh.exe
83k 2000/06/11 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
"cygitcl30.dll" v0.0 ts=2000/6/11 5:34
35k 2000/06/11 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
"cygitk30.dll" v0.0 ts=2000/6/11 5:34
402k 2000/06/11 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
"cygtcl80.dll" v0.0 ts=2000/6/11 5:30
5k 2000/06/11 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
10k 2000/06/11 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
"cygtclreg80.dll" v0.0 ts=2000/6/11 5:30
639k 2000/06/11 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
"cygtk80.dll" v0.0 ts=2000/6/11 5:34
586k 2000/08/04 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
"cygwin1.dll" v0.0 ts=2000/8/4 2: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
Use -h to see help about each section
___________________________________________________
Eirik Nordbrøden Tlf. (+47) 69 21 27 18
Scandpower A/S Fax. (+47) 69 18 44 35
Os Alle 9 Tlf. priv. (+47) 69 18 78 99
N-1777 Halden Tlf. mobile (+47) 90 17 47 89
Norway
Email: mailto:eirik.nordbroden@scandpower.no
WWW: http://www.scandpower.no/
___________________________________________________
> -----Original Message-----
> From: Earnie Boyd [ mailto:earnie_boyd@yahoo.com ]
> Sent: 18. august 2000 14:05
> To: Eirik_Nordbrden; cygwin@sourceware.cygnus.com
> Subject: Re: CR/LF and read is shell scripts
>
>
> --- Eirik_Nordbrøden <eirik.nordbroden@scandpower.no> wrote:
> > Hello
> >
> > I have just installed cygwin on my NT workstation and have a
> problem with a
> > shell script. The script generates a temporary file by the use
> of the echo
> > statement and later on the content is evaluated with a cat and
> consecutive
> > read statements. The problem is that the generated file
> contains CRLF at the
> > end of each line, but the read statement only recognises the LF
> and therefore
> > adds CR to the last variable read. I do not want to change the
> script so I
> > wonder if this is an installation problem or if there are some
> other way to
> > get around it. At installation I choose the option to treat all
> text files as
> > MS Dos files.
> >
>
> Output pasted into a mail from `cygcheck -s -r -v' would be
> useful. Post it to
> the list not to me. BTW, I'm guessing that you're using non-Cygwin tools
> somewhere along the way.
>
> Cheers,
>
> =====
> ---
> Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
> __Cygwin: POSIX on Windows__
> Cygwin Newbies: < http://gw32.freeyellow.com/ >
> __Minimalist GNU for Windows__
> Mingw32 List: < http://www.egroups.com/group/mingw32/ >
> Mingw Home: < http://www.mingw.org/ >
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: CR/LF and read is shell scripts
@ 2000-08-18 7:39 Fifer, Eric
0 siblings, 0 replies; 11+ messages in thread
From: Fifer, Eric @ 2000-08-18 7:39 UTC (permalink / raw)
To: cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]
Eirik_Nordbrøden <eirik.nordbroden@scandpower.no> wrote:
> The script generates a temporary file by the use of the echo
> statement and later on the content is evaluated with a cat and consecutive
> read statements. The problem is that the generated file contains CRLF at
the
> end of each line, but the read statement only recognises the LF and
therefore
> adds CR to the last variable read.
The behavior of cat seems to have changed (presumably
after the textutils-2.0 upgrade on 7/8). Formerly,
it performed CR/LF mapping based on the binary/text
mode of the input file. Now it is always in binary
mode, unless you're adding numbers (or other non-verbatim
options). In these examples x has "hello\r\n":
$ od -c x
0000000 h e l l o \r \n
0000007
On binary mount:
$ cat x | od -c
0000000 h e l l o \r \n
0000007
$ cat -n x | od -c
0000000 1 \t h e l l o \r \n
0000016
On text mount:
$ cat x | od -c
0000000 h e l l o \r \n
0000007
$ cat -n x | od -c
0000000 1 \t h e l l o \n
0000015
There are old threads discussing how people disliked
the text behavior of cat. However, I think the old
behavior of cat should be restored. And, for those
who need binary behavior there is now a -B/--binary
option.
Any other opinions?
Eric Fifer
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: CR/LF and read is shell scripts
@ 2000-08-18 5:06 Earnie Boyd
2000-08-22 7:09 ` Eirik Nordbrøden
0 siblings, 1 reply; 11+ messages in thread
From: Earnie Boyd @ 2000-08-18 5:06 UTC (permalink / raw)
To: Eirik_Nordbrøden, cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]
--- Eirik_Nordbrøden <eirik.nordbroden@scandpower.no> wrote:
> Hello
>
> I have just installed cygwin on my NT workstation and have a problem with a
> shell script. The script generates a temporary file by the use of the echo
> statement and later on the content is evaluated with a cat and consecutive
> read statements. The problem is that the generated file contains CRLF at the
> end of each line, but the read statement only recognises the LF and therefore
> adds CR to the last variable read. I do not want to change the script so I
> wonder if this is an installation problem or if there are some other way to
> get around it. At installation I choose the option to treat all text files as
> MS Dos files.
>
Output pasted into a mail from `cygcheck -s -r -v' would be useful. Post it to
the list not to me. BTW, I'm guessing that you're using non-Cygwin tools
somewhere along the way.
Cheers,
=====
---
Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
__Cygwin: POSIX on Windows__
Cygwin Newbies: < http://gw32.freeyellow.com/ >
__Minimalist GNU for Windows__
Mingw32 List: < http://www.egroups.com/group/mingw32/ >
Mingw Home: < http://www.mingw.org/ >
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* CR/LF and read is shell scripts
@ 2000-08-18 1:08 Eirik Nordbrøden
0 siblings, 0 replies; 11+ messages in thread
From: Eirik Nordbrøden @ 2000-08-18 1:08 UTC (permalink / raw)
To: cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]
Hello
I have just installed cygwin on my NT workstation and have a problem with a shell script. The script generates a temporary file by the use of the echo statement and later on the content is evaluated with a cat and consecutive read statements. The problem is that the generated file contains CRLF at the end of each line, but the read statement only recognises the LF and therefore adds CR to the last variable read. I do not want to change the script so I wonder if this is an installation problem or if there are some other way to get around it. At installation I choose the option to treat all text files as MS Dos files.
___________________________________________________
Eirik Nordbrøden Tlf. (+47) 69 21 27 18
Scandpower A/S Fax. (+47) 69 18 44 35
Os Alle 9 Tlf. priv. (+47) 69 18 78 99
N-1777 Halden Tlf. mobile (+47) 90 17 47 89
Norway
Email: mailto:eirik.nordbroden@scandpower.no
WWW: http://www.scandpower.no/
___________________________________________________
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2000-08-22 14:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-22 10:54 CR/LF and read is shell scripts Earnie Boyd
-- strict thread matches above, loose matches on Subject: below --
2000-08-22 10:57 Earnie Boyd
2000-08-22 14:34 ` Larry Hall (RFK Partners, Inc)
2000-08-22 9:35 Fifer, Eric
2000-08-22 8:58 Earnie Boyd
2000-08-22 11:30 ` Larry Hall (RFK Partners, Inc)
2000-08-22 8:03 Fifer, Eric
2000-08-18 7:39 Fifer, Eric
2000-08-18 5:06 Earnie Boyd
2000-08-22 7:09 ` Eirik Nordbrøden
2000-08-18 1:08 Eirik Nordbrøden
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).