expand changing DOS line endings to Unix line endings
David Christensen
dpchrist@holgerdanske.com
Sun Jan 2 20:27:00 GMT 2005
Cygwin:
I have run Cygwin setup and chosen "DOS" line endings.
When I create a text file with DOS line endings (CRLF):
This is a text file created with Notepad.
It has DOS (CRLF) line endings.
Look at it with (unxutils) "od":
<CVSENV>dpchrist@p42800e:~$ dump textfile.txt
000000 T h i s i s a t e x t f
000010 i l e c r e a t e d w i t h
000020 N o t e p a d . \r \n I t h a
000030 s D O S ( C R L F ) l i n
000040 e e n d i n g s . \r \n
00004c
Run it through Cygwin "expand":
<CVSENV>dpchrist@p42800e:~$ expand textfile.txt > textfile.out
And look at the output using (unxutils) "od":
<CVSENV>dpchrist@p42800e:~$ dump textfile.out
000000 T h i s i s a t e x t f
000010 i l e c r e a t e d w i t h
000020 N o t e p a d . \n I t h a s
000030 D O S ( C R L F ) l i n e
000040 e n d i n g s . \n
00004a
Note that the line endings have been changed to Unix ("\n").
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 16159 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050102/c676c78a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: textfile.out
Type: application/octet-stream
Size: 74 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050102/c676c78a/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: textfile.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050102/c676c78a/attachment.txt>
-------------- next part --------------
--
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/
More information about the Cygwin
mailing list