On Sat, Jul 23, 2022 at 10:32:35PM +0200, Steffen Nurpmeso wrote: > наб wrote in > <20220723193024.d7nv7lj43rhnl...@tarta.nabijaczleweli.xyz>: > |Is the standard's intent to require > | "%u∆%d∆%s\n" > |or should the section read something like > | STDOUT > | For each file processed successfully, > | the cksum utility shall write in the following format, > | if any file operands were specified: > | "%u %d %s\n", <checksum>, <# of octets>, <pathname> > | or if no file operand was specified: > | "%u %d\n", <checksum>, <# of octets> > | > |Line numbers from 202x/D2.1, also affects Issue 7. > > cksum(1) implementations differ in the wild. > It was the dear Jörg Schilling who nudged me to the understanding > that Sun's cksum(1) indeed works correctly, it is just the output > that differs and needs normlization (via "cat -vet|grep cksum"):
I'm largely asking this from an implementer's standpoint ‒ i.e. if I'm allowed to output tabs in the output (or not and the intent was to sped ∆s). Thanks for your example of existing practice, this points to the "'<space>' should've been '<blank>s'" interpretation. > csum="`${cksum} < "${f}" | ${sed} -e 's/[ ^I]\{1,\}/ /g'`"$ Out of morbid curiosity: any reason this couldn't be tr -s '\t' ' '? > --steffen Best, наб Please keep me in CC.
signature.asc
Description: PGP signature