This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: carriage return newline being appended when using redirection in binary mode


Am 15.04.2019 um 13:56 schrieb chris.day@pinky.co.uk:
Hi -

I'm having problems with carriage return newline being appended when using
redirection in binary mode. If I pipe to cat and redirect the newline is
preserved, which is odd.

CYGWIN_NT-10.0 edmund 3.0.6(0.338/5/3) 2019-04-06 16:18 x86_64 Cygwin

chrisd@edmund:chrisd > mount
E:/abinitio/cygwin/bin on /usr/bin type ntfs (binary,auto)
E:/abinitio/cygwin/lib on /usr/lib type ntfs (binary,auto)
E:/abinitio/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)
E: on /cygdrive/e type ntfs (binary,posix=0,user,noumount,auto)
F: on /cygdrive/f type ntfs (binary,posix=0,user,noumount,auto)
G: on /cygdrive/g type ntfs (binary,posix=0,user,noumount,auto)
H: on /cygdrive/h type vfat (binary,posix=0,user,noumount,auto)
Q: on /cygdrive/q type ntfs (binary,posix=0,user,noumount,auto)
chrisd@edmund:chrisd > echo "Hello"
Hello
chrisd@edmund:chrisd > echo "Hello"  | od -c
0000000   H   e   l   l   o  \n
0000006
chrisd@edmund:chrisd > echo "Hello"  > foo.txt
chrisd@edmund:chrisd > od -c foo.txt
0000000   H   e   l   l   o  \r  \n
0000007
chrisd@edmund:chrisd > echo "Hello"  | cat > foo.txt
chrisd@edmund:chrisd > od -c foo.txt
0000000   H   e   l   l   o  \n
0000006

I can not replicate
 $ uname -a
CYGWIN_NT-10.0 LAPTOP-82F08ILC 3.0.6(0.338/5/3) 2019-04-06 16:18 x86_64
Cygwin

$ echo "Hello" > foo.txt
$ od -c foo.txt
0000000   H   e   l   l   o  \n
0000006

can you provide the cygcheck.out as mentioned on
https://cygwin.com/problems.html

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus


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


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