3 ms·
I wrote a Lua script to do the same thing once. Mentioned it to an old Unix hand, she replied "hmm, what about `xxd -i < file`"? Live and learn.
by samatman 4y ago
I wrote a Lua script to do the same thing once.
Mentioned it to an old Unix hand, she replied "hmm, what about `xxd -i < file`"?
Live and learn.
- ghoward 4y agoConsidering I knew I had to make it work everywhere, and that included not depending on tools that are not standard in POSIX, I still think I made the right choice. But yes, xxd is an easy solution.
- samatman 4y agoI still use the Lua script, why not? Granted I can replace it with xxd and two lines of awk, but that would have taken longer, and what's done's done, it's not a task with shifting requirements.
- electroly 4y agoI don't know who needs to know this, but if you pull xxd.c out of the vim codebase, you can compile it by itself without building vim. It doesn't depend on any other part of vim. I just vendored that one file and ditched the rest of vim.