everything wrong with free software

 "obedience breeds foolishness"

### sha256dups other pages: => the-wonders-of-modularity.html the-wonders-of-modularity *originally posted:* jul 2021 the version of uniq in openbsd is not as feature-rich as im used to. i am working with a very long list of sha256 sums, mixed with other text, and i want to be able to do the following: 1. only process lines that start with "SHA256" 2. show entire lines 3. but only when the line is part of a group of 2 or more consecutive lines with the same hash 4. where the lines are in the format created by the sha256 command in openbsd this is one of those programs where i wrote it on the spot to do something fairly simple, didnt do a lot of testing, got it to do what i wanted after few tries and little debugging. a lot of programs i write in fig are like this: quick, small, single-feature. heres how you use it: > find /home/user -type f -size -1024c -exec sha256 {} + | rev | sort | rev | ./sha256dups.fig.py this will group together duplicate files that are less than 1024 bytes in size. (save as sha256dups.fig and compile) ``` #### license: creative commons cc0 1.0 (public domain) #### http://creativecommons.org/publicdomain/zero/1.0/ proginf = "sha256dups 0.1, jul 2021 mn" p arrstdin buf arr mid 1 0 fbuf arr mid 1 0 bk "" function printbuf buf fbuf buflen buf len ifmore buflen 1 now "" print print forin bufs fbuf now bufs print next next fig forin each p issha each ltrim left 6 instr issha "SHA256" iftrue issha r64 each rtrim right 64 isnew instr bk r64 not iftrue isnew now printbuf buf fbuf buf r64 arr fbuf each arr else buf plus r64 fbuf plus each next bk r64 next next now printbuf buf fbuf ``` => https://wrongwithfreesw.neocities.org