How can we print hex values without offsets using hexdump?

  • Thread starter Thread starter heartless
  • Start date Start date
Click For Summary
To print only the hex values of a file without offsets using hexdump, users can consider alternative methods. One suggestion is to run the output through another program that reformats it, which can be done quickly with a simple C program or even faster using scripting languages like Python or Perl. Additionally, the tool 'colrm' is recommended as it can achieve the desired formatting directly, eliminating the need for custom scripts.
heartless
Messages
220
Reaction score
2
Hello people,
Is there any way to prompt hexdump to print just the hex values of the file without offsets, f.ex normally when you hex your file it looks something like this:

0000b10 ec33 b3b2 4b3b e293 7ef9 f73e 3333 9ce7

and we want to make it:

ec33 b3b2 4b3b e293 7ef9 f73e 3333 9ce7

Any ideas?

Thanks,
 
Computer science news on Phys.org
You could just run the output through another program that reformats it the way you want. It would take probably 5 minutes to write a C program to do it, and even faster in a scripting language like python or perl, or to use sed if you know them.

(Yes, this is a plug for learning a scripting language. :biggrin:)

But, in this case, there is already a program to do essentially what you want: colrm.
 
Last edited:
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
Replies
15
Views
10K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 43 ·
2
Replies
43
Views
4K
Replies
5
Views
2K
  • · Replies 22 ·
Replies
22
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 23 ·
Replies
23
Views
2K
Replies
34
Views
5K