3
1
Is there a program or CMD command with which I can simply reverse or flip all the bytes of a file? For example if I have a text file (as a simple example) that says "Hello, world!", the program/command would flip it to say "!dlrow ,olleH".
So yeah, is there any way to do this? I'm a programmer and know that it would be trivial to write my own program for this, but I'd rather not go through the trouble if there's already something that can do it. A batch script would also be OK.
2I'd say, go through the trouble. Apparently it is trivial and you can then share your few moments work. Regards, – Xavierjazz – 2014-11-04T23:33:32.843
Of course, if there isn't already anything for this I don't mind writing a program myself (and I'm sure others might also find it useful). However if there's already something for this then there's no point reinventing the wheel. – puggsoy – 2014-11-04T23:52:16.087
xxd goes part of the way there. xxd -p yourfile dumps the hex You can get xxd with vim7.x But then what to type that to reverse it as you want, i'm not sure. I suppose a perl one-liner though I don't really know perl as yet. – barlop – 2014-11-05T00:05:42.027