[SunHELP] BIG_ENDIAN-LITLE INDIAN
David Eisner
cradle at umd.edu
Tue Jun 8 09:41:02 CDT 2004
I don't think there's any simple way to do it without
knowing the details of the file format.
Suppose the file file on the PC starts out with these
six bytes:
0x04 0x03 0x02 0x01 0x02 0x01
If it turns out this is an int followed by a short,
on the Sun it becomes: 0x01 0x02 0x03 0x04 0x01 0x02.
But if it is a short followed by a long, it would
become 0x03 0x04 0x01 0x02 0x01 0x02.
-David
Sheldon T. Hall wrote:
> Rene Occelli writes ...
>
>
>
>>I've to read binary file created on a PC. So I'm looking for tools
>>to convert it that it is Ok to read on a Sun.
>>
>>
>
>I think you can use dd and the -swab option to do that, perhaps something
>like ...
>
>dd -swab -if=pc-file -of=sun-file
>
>man dd for details, etc.
>
>-Shel
>_______________________________________________
>SunHELP maillist - SunHELP at sunhelp.org
>http://www.sunhelp.org/mailman/listinfo/sunhelp
>
>
More information about the SunHELP
mailing list