> I heard it was impossible to swap a 4 byte number in a shell script
> even if they are all 4 byte numbers.
I don't know about impossible, but I'd probably prefer to do it in a
perl script. That would handle binary data easily.
read, unpack, pack, print...
Quote:> Is there a way for the program in
> a shell script to know if it is 2 or 4 byte, like look for whitespace?
What whitespace? Is this a file you know something about or are you
talking about an arbitrary binary file? Such a file may not have
whitespace, or worse you might misinterpret binary data as whitespace.
Do you have a spec for the format, or is it something you're familiar
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >