I have a binary file where records are separated by newlines.
hexdump just dumps everything with a fixed column width. Is there a tool to hexdump this file, while honoring the newline separator? (Any other separator, like
0, would also be fine.)
This Python script will do it, sort of:
#!/usr/bin/env python3 import fileinput for line in fileinput.input(mode='rb'): print(line)
There's one problem that I hadn't realized: the binary data may itself contain the separator character, messing up the output.