Sample Header Ad - 728x90

Undump od (octal or hex dump) in Version 6 Unix

2 votes
2 answers
2389 views
od (octal dump) command is implemented in Unix since Version 1. However, I couldn't find a reverse command in the [Version 6 Unix manual](https://ia800600.us.archive.org/19/items/v6-manual/v6-manual.pdf) (1975). Modern ways of reversing od with either xxd or sed do not apply to Unix V6, since sed and awk appeared only in Version 7 (while uudecode, xxd and base64 are not available neither). The questions are: - How did people in 1975 convert octal or hex listings into binary files? - How can I do this in a PDP-11 emulator that only allows me to paste text into terminal from clipboard? (In other words, is it necessary to write my own program for that?) Here is a sample hex dump of a binary file by od that I'd like to convert back into binary: # od -h /bin/sum 0000000 0107 00ba 0000 0204 0000 0000 0000 0001 0000020 1583 0bd6 0ac3 0601 8901 0a37 00ae 15b7 0000040 0002 8905 0000 0000 8609 15c0 0001 8904 0000060 0026 0005 01ef 706f 6472 000a 1001 0a05 0000100 1040 8903 00be 0200 870b 0bc0 030e 0ab7 0000120 007a 15c2 00be 9484 6105 0b45 7e04 01f0 0000140 15c0 0001 8904 0080 0002 09f7 0026 15c0 0000160 0001 8904 0083 0001 1dc5 0050 09f7 0014 0000200 15c0 0001 8904 0082 0001 1040 8906 01c2 0000220 203f 200a 1026 1066 1141 09f7 0006 1581 0000240 1580 0087 0a00 7217 000a 1066 1001 0302 0000260 09f7 fff0 15b7 0012 65f7 0030 000c 15c0 0000300 0001 8904 00ba 0001 0087 0000312
Asked by Andriy Makukha (548 rep)
Jul 3, 2019, 01:22 PM
Last activity: Jul 7, 2019, 08:59 AM