aboutsummaryrefslogtreecommitdiffstats
path: root/include/gbos.inc
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-24 13:56:42 +0200
committeruser <user@clank>2026-09-24 13:56:42 +0200
commit0fa1b946ec5fd3f5cba49215ea9ab62c4004aa53 (patch)
tree2d50213ab441f2543ba129241ceda29c5d9b496d /include/gbos.inc
parentircd: enforce unique nicknames (433), announce renames, fold case (diff)
downloadgbos-0fa1b946ec5fd3f5cba49215ea9ab62c4004aa53.tar.gz
gbos-0fa1b946ec5fd3f5cba49215ea9ab62c4004aa53.tar.xz
gbos-0fa1b946ec5fd3f5cba49215ea9ab62c4004aa53.zip
usr: xxd - hex dump a file or stdin
Eight bytes per line rather than the usual sixteen: offset + 8 hex pairs + the ASCII column is 38 of the terminal's 40 columns, where 16 would wrap every line and make the dump unreadable. -c overrides it. No -s (skip): there is no seek syscall, so it streams from the start - the same reason tail(1) has to keep a ring. /# xxd h 0000: 48 65 6c 6c 6f 20 67 62 Hello gb 0008: 6f 73 0d 0a os.. blk(1) could already peek at raw disk blocks; nothing could look inside a file. Verified against known bytes, from stdin, with -c, through a pipe, and on a missing file.
Diffstat (limited to 'include/gbos.inc')
-rw-r--r--include/gbos.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/gbos.inc b/include/gbos.inc
index 76981da..1af3fc8 100644
--- a/include/gbos.inc
+++ b/include/gbos.inc
@@ -330,5 +330,6 @@ DEF PROG_TEE EQU 42
DEF PROG_TAIL EQU 43
DEF PROG_HELP EQU 44
DEF PROG_POWEROFF EQU 45
+DEF PROG_XXD EQU 46
ENDC