This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
awk / sed - trouble with CR character
- From: Cary Lewis <clewis at mobilecom dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 25 Aug 2003 17:12:22 -0400
- Subject: awk / sed - trouble with CR character
I have a binary file, with 8 lines of ascii at the top, and then a binary
line
The binary line contains the 0x0d.
E.g.
$ od -tx1 a
0000000 31 0a 32 0a 33 0a 34 0a 35 0a 36 0a 37 0a 38 0a
0000020 31 32 33 0d 0a 39 39 39 0a 34 35 36 0a
0000035
$ cat a
1
2
3
4
5
6
7
8
123
999
456
If I try to to use sed to eliminate the first 8 lines (or awk)
then the CR character is dropped
e.g.
sed '1,8d' a | od -tx1 yields:
$ sed '1,8d' a|od -tx1
0000000 31 32 33 0a 39 39 39 0a 34 35 36 0a
0000014
Is there a way to make this work in Cygwin.
This works fine under Sco unix.
I have installed Cygwin in 'Unix' mode, so I'm not sure what is going on.
Thanks for any help.
--
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/