Hello. Sorry for the late reply.
наб wrote in <20220723210935.jwgfb2izb5owu...@tarta.nabijaczleweli.xyz>: |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' ' '? No, i don't think so; except my personal experience is better with sed. I even have forgotten where the necessity to use [ ^I] instead of [ \t] comes from, i do not seem to currently have access to a box which would require it. (I would understand it for awk, but even the old broken Debian mawk from the 90s seems to disappear with the next release i have heard.) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)