----------------------------------------------------------------------------------
@MSGID:
<a203bd98-4a59-4da9-ac83-657ae954e1b9n@googlegroups.com> f68ae64a
@REPLY: 1@dont-email.me> db331fc3
@REPLYADDR hongy...@gmail.com
<hongyi.zhao@gmail.com>
@REPLYTO 2:5075/128 hongy...@gmail.com
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
<3b93482a-421e-43a8-9d9a-d1cf557a4612n@googlegroups.com> 1@dont-email.me>
@RFC-Message-ID:
<a203bd98-4a59-4da9-ac83-657ae954e1b9n@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
On Tuesday, August 22, 2023 at 10:49:11 PM UTC+8, Janis Papanagnou wrote:
> On 22.08.2023 15:58,
hongy...@gmail.com wrote:
> > See my following example:
> >
> > werner@X10DAi:~$ echo -n -e "4Vx" | od -An -x --endian=big
> > 1234 5678
> > werner@X10DAi:~$ echo -n -e "4Vx" | od -An -x --endian=little
> > 3412 7856
> (My `od` doesn`t support `--endian`; I use different options below
> and show only the little-endian results.)
What`s your version of `od`? Mine is as follows:
werner@X10DAi:~$ od --version|head -1
od (GNU coreutils) 8.32
> >
> > Could you tell me why the latter doesn`t give the following result?
> Endian-ness swaps bytes in "words" (default "word" is 2 octets; you
> define what a "word" is).
>
> $ echo -n -e $`4Vx` | od -An -t x1
> 12 34 56 78
> $ echo -n -e $`4Vx` | od -An -t x2
> 3412 7856
> $ echo -n -e $`4Vx` | od -An -t x4
> 78563412
> 0000ab9078563412
Got it. Thank you very much for your explanation.
>
> Janis
Zhao
> >
> > 7856 3412,
> > aka,
> > 0x78 0x56 0x34 0x12
> >
> > Regards,
> > Zhao
> >
--- G2/1.0
* Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5075/128
@PATH: 5075/128 5020/1042 4441