Re: "od" wrong line endings and byte count

2005-01-03 Thread Corinna Vinschen
On Jan 2 17:27, Christopher Faylor wrote: > On Sun, Jan 02, 2005 at 12:34:03PM -0800, Brian Dessent wrote: > >David Christensen wrote: > >> When I create a file using notepad: > >> Look at it using "wc": > >> > >> [EMAIL PROTECTED]:~$ wc textfile.txt > >> 2 14 76 t

RE: "od" wrong line endings and byte count

2005-01-02 Thread Gary R. Van Sickle
> > ? By one of the two ways God intended when he gave Moses POSIX: > > > > 1. O_BINARY > > 2. "rb" > > Umm, that's not what I think of as "by default". I call that > "hardcoded". Right: hardcoded to work properly by default. -- Gary R. Van Sickle -- Unsubscribe info: http://cygwin

Re: "od" wrong line endings and byte count

2005-01-02 Thread Christopher Faylor
On Sun, Jan 02, 2005 at 05:48:21PM -0800, Brian Dessent wrote: >Yitzchak Scott-Thoennes wrote: >>>I thought we were talking about 'od' here where presumably you always >>>want to open files for reading in binary mode? (And as far as I know >>>od doesn't write anything, redirection aside...) >> >>'

Re: "od" wrong line endings and byte count

2005-01-02 Thread Brian Dessent
Yitzchak Scott-Thoennes wrote: > > I thought we were talking about 'od' here where presumably you always > > want to open files for reading in binary mode? (And as far as I know od > > doesn't write anything, redirection aside...) > > 'twas redirection I was thinking of: > > $ od /dev/null>od.o

Re: "od" wrong line endings and byte count

2005-01-02 Thread Christopher Faylor
On Sun, Jan 02, 2005 at 05:16:40PM -0800, Yitzchak Scott-Thoennes wrote: >On Sun, Jan 02, 2005 at 05:58:47PM -0600, "Gary R. Van Sickle" wrote: >>>On Sun, Jan 02, 2005 at 05:27:45PM -0500, Christopher Faylor wrote: On Sun, Jan 02, 2005 at 12:34:03PM -0800, Brian Dessent wrote: >This means t

Re: "od" wrong line endings and byte count

2005-01-02 Thread Yitzchak Scott-Thoennes
On Sun, Jan 02, 2005 at 05:29:21PM -0800, Yitzchak Scott-Thoennes wrote: > On Sun, Jan 02, 2005 at 05:28:35PM -0800, Brian Dessent <[EMAIL PROTECTED]> > wrote: Sorry for the inadvertent email address there. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports:

Re: "od" wrong line endings and byte count

2005-01-02 Thread Yitzchak Scott-Thoennes
On Sun, Jan 02, 2005 at 05:28:35PM -0800, Brian Dessent <[EMAIL PROTECTED]> wrote: > Yitzchak Scott-Thoennes wrote: > > > > > ? By one of the two ways God intended when he gave Moses POSIX: > > > > > > > > 1. O_BINARY > > > > 2. "rb" > > > > > > (3. link with binmode.o) > > > > Wouldn't binmode

Re: "od" wrong line endings and byte count

2005-01-02 Thread Gerrit P. Haase
Gerrit P. Haase wrote: David Christensen wrote: And then look at it with Cygwin "od", I see: Obviously you used an old buggy version of od. Hmm, I don't get it. Resolved. Gerrit -- =^..^= -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/pro

Re: "od" wrong line endings and byte count

2005-01-02 Thread Brian Dessent
Yitzchak Scott-Thoennes wrote: > > > ? By one of the two ways God intended when he gave Moses POSIX: > > > > > > 1. O_BINARY > > > 2. "rb" > > > > (3. link with binmode.o) > > Wouldn't binmode.o change it to not output crlf to text mounts? > Probably wouldn't be a good choice. I thought we were

Re: "od" wrong line endings and byte count

2005-01-02 Thread Yitzchak Scott-Thoennes
On Sun, Jan 02, 2005 at 04:54:16PM -0800, Brian Dessent <[EMAIL PROTECTED]> wrote: > "Gary R. Van Sickle" wrote: > > > > > I think that this is a regression of "od", though. It > > > probably should > > > > use binmode by default. > > > > > > I would tend to agree, but how would you change this

Re: "od" wrong line endings and byte count

2005-01-02 Thread Gerrit P. Haase
Brian Dessent wrote: David Christensen wrote: cygwin: When I create a file using notepad: This is a text file created with Notepad. It has DOS (CRLF) line endings. Look at it using "wc": [EMAIL PROTECTED]:~$ wc textfile.txt 2 14 76 textfile.txt And then look at i

Re: "od" wrong line endings and byte count

2005-01-02 Thread Yitzchak Scott-Thoennes
On Sun, Jan 02, 2005 at 05:58:47PM -0600, "Gary R. Van Sickle" wrote: > > On Sun, Jan 02, 2005 at 05:27:45PM -0500, Christopher Faylor wrote: > > > On Sun, Jan 02, 2005 at 12:34:03PM -0800, Brian Dessent wrote: > > > >This means that when a cygwin program reads a file with > > CRLF endings > > >

Re: "od" wrong line endings and byte count

2005-01-02 Thread Brian Dessent
"Gary R. Van Sickle" wrote: > > > I think that this is a regression of "od", though. It > > probably should > > > use binmode by default. > > > > I would tend to agree, but how would you change this default > > if desired? > > > > ? By one of the two ways God intended when he gave Moses POSIX:

RE: "od" wrong line endings and byte count

2005-01-02 Thread Gary R. Van Sickle
> On Sun, Jan 02, 2005 at 05:27:45PM -0500, Christopher Faylor wrote: > > On Sun, Jan 02, 2005 at 12:34:03PM -0800, Brian Dessent wrote: > > >This means that when a cygwin program reads a file with > CRLF endings > > >it is translated to LF line endings that all unix tools > expect. You > > >w

Re: "od" wrong line endings and byte count

2005-01-02 Thread Yitzchak Scott-Thoennes
On Sun, Jan 02, 2005 at 05:27:45PM -0500, Christopher Faylor wrote: > On Sun, Jan 02, 2005 at 12:34:03PM -0800, Brian Dessent wrote: > >This means that when a cygwin program reads a file with CRLF endings it > >is translated to LF line endings that all unix tools expect. You want > >binary mounts

Re: "od" wrong line endings and byte count

2005-01-02 Thread Christopher Faylor
On Sun, Jan 02, 2005 at 12:34:03PM -0800, Brian Dessent wrote: >David Christensen wrote: >> >> cygwin: >> >> When I create a file using notepad: >> >> This is a text file created with Notepad. >> It has DOS (CRLF) line endings. >> >> Look at it using "wc": >> >> [EMAIL PROTECTE

Re: "od" wrong line endings and byte count

2005-01-02 Thread Brian Dessent
David Christensen wrote: > > cygwin: > > When I create a file using notepad: > > This is a text file created with Notepad. > It has DOS (CRLF) line endings. > > Look at it using "wc": > > [EMAIL PROTECTED]:~$ wc textfile.txt > 2 14 76 textfile.txt > > A

Re: od -x

2002-04-15 Thread Matthew Smith
od -xIntel processors are little endian. cheers, -Matt Smith The od utility doesn't seem to behaving properly. With the -x option, it reverses bytes e.g. 5245 4f43 when it should be 4552 434f. With no options, I can detect no correspondence to the actual input data and no pattern whatsoever.

Re: od

2002-02-19 Thread Jan Nieuwenhuizen
Randall R Schulz <[EMAIL PROTECTED]> writes: > Sir, > > You have got to be kidding. 22:53:33 fred@appel:~$ uname -a Linux appel.lilypond.org 2.4.18-pre9-benh #1 Sat Feb 16 20:51:15 CET 2002 ppc unknown 22:53:37 fred@appel:~$ echo http > http 22:53:43 fred@appel:~$ od -bcx http

RE: od

2002-02-19 Thread Randall R Schulz
Hi, Heribert, Ahh, yes, my old friend dd and his funky command syntax (inspired by some old IBM command language, if I'm not mistaken). The Swiss Army Knife of Unix data transfer. Thanks for reminding me. However, I don't see a 4-byte equivalent to "conv=swab" in the manual page, so this will

RE: od

2002-02-19 Thread Heribert Dahms
]) > -Original Message- > From: Randall R Schulz [SMTP:[EMAIL PROTECTED]] > Sent: Tuesday, February 19, 2002 17:56 > To: David; Mark Himsley > Cc: [EMAIL PROTECTED] > Subject: Re: od > > Sir, > > You have got to be kidding. > > For the record, t

RE: od

2002-02-19 Thread Roth, Kevin P.
David - I agree with you that the little-endian representation can be somewhat confusing; however, as Mark pointed out, it's not likely to ever change... I've had my own "struggles" with od's idea of output formats, and have come up with a few options along the way. Here's some that will help,

Re: od

2002-02-19 Thread Mark Himsley
On Tue, 19 Feb 2002 14:03:55 GMT you wrote: > > > Then, I run od -bcx and I get: > > > > > > 110 124 124 120 012 000 > > > H T T P \n \0 > > > 5448 5054 000a > > > > That is correct in this little-endian platform, see > > http://info.astrian.net/jargon/terms/l/little-endian.html > > I

Re: od

2002-02-19 Thread Larry Hall (RFK Partners, Inc)
At 09:03 AM 2/19/2002, David wrote: >Hi Mark, > >Thank you for your reply to my message about the od utility: I wrote: > > >> I created at test file with 4 characters in it: > >> > >> HTTP > >> > >> Then, I run od -bcx and I get: > >> > >> 110 124 124 120 012 000 > >> H T T

Re: od

2002-02-19 Thread Randall R Schulz
Sir, You have got to be kidding. For the record, the x86 architecture is little-endian, PowerPC, e.g., is bid-endian. On the off chance that you're running Windows NT (and Cygwin???) on an Alpha, I have to admit I don't know which byte ordering it uses. You will get the 16-bit output you wan

Re: od

2002-02-19 Thread Michael A Chase
- Original Message - From: "David" <[EMAIL PROTECTED]> To: "Mark Himsley" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, February 19, 2002 06:03 Subject: Re: od > > >You can see that the hex values in the last line are revers

Re: od

2002-02-19 Thread David
Hi Mark, Thank you for your reply to my message about the od utility: I wrote: >> I created at test file with 4 characters in it: >> >> HTTP >> >> Then, I run od -bcx and I get: >> >> 110 124 124 120 012 000 >> H T T P \n \0 >> 5448 5054 000a You wrote: > That is cor

Re: od

2002-02-15 Thread Mark Himsley
On Fri, 15 Feb 2002 14:06:27 GMT you wrote: >I created at test file with 4 characters in it: > > HTTP > >Then, I run od -bcx and I get: > >110 124 124 120 012 000 > H T T P \n \0 >5448 5054 000a That is correct in this little-endian platform, see http://info.astrian.net/jargon/ter