3 ms·
One more amulet generator, for the road... #!/bin/bash COUNT=1 while true ; do COUNT=$((COUNT+1)) SHA=`echo "I adopted $COUNT puppies." | sha256s
by SquibblesRedux 5y ago
One more amulet generator, for the road...
#!/bin/bash
COUNT=1
while true ; do
COUNT=$((COUNT+1))
SHA=`echo "I adopted $COUNT puppies." | sha256sum | egrep 8888`
if [ "$SHA" != "" ] ; then
echo "$SHA I adopted $COUNT puppies."
fi
done
Sample output:
4f3e14ded07eda16a7fb57c42aebf1f97ef67acba4980bf472a8e188887c7726 - I adopted 6484 puppies.
57c3e9fd05f06a705206d38888b317b5eb596d35c6f308b909a440e2c8e391c8 - I adopted 6627 puppies.
4624f6bb4c7d3d8328888495c1422a1891b609b81abda3ff4d70bedd1c4f6cdd - I adopted 12631 puppies.
9c0be05548139888804d3799ad5729ea424b0487487a6b18803f1aa5746c1904 - I adopted 15663 puppies.
c60fc3f97f62ee07665325e235faa05fefc445aee7d356a9d81f58888c475147 - I adopted 15861 puppies.
Bonus points if the number of puppies adopted is a palindromic prime. [1]
[1] https://en.wikipedia.org/wiki/Palindromic_prime https://en.wikipedia.org/wiki/Palindromic_prime
- PaulDavisThe1st 5y agoTweaked to find 5 8's: 88888eb74ed90df21487f33795e8af9f578b6b5e359db71e4ac0b2bd8b1115c8 - I adopted 34534 puppies. 7c31d274888888f28e37743d4c554e5fffdb7df35a1291bc83119e31743a233b - I adopted 43653 puppies. e88888508aeaea73f45925e9af3e95890ec15362ce0b0244f56d271f0ba8ce8e - I adopted 53527 puppies. probably more coming soon ...
- deleted 5y ago[deleted]
- PaulDavisThe1st 5y agoNow 6: 7c31d274888888f28e37743d4c554e5fffdb7df35a1291bc83119e31743a233b - I adopted 43653 puppies. 5888888c44ce19109d9021679ca8023314cb06a0b48fe9f57f34d2f83ee5a971 - I adopted 321255 puppies. b4b4f1bdf07da6049c7aa172504e8f7464d13333508888889743ebd9136f0345 - I adopted 521564 puppies. It's hard to buy the classification of rarity outlined in TFA.
- wyattpeak 5y agoHaving to write 40k submissions to find one with 6 8s more than qualifies as rare to my mind. Automatically incrementing a string might satisfy the requirements, but for an artistic project it's not what I'd base the metrics on, and indeed I don't think the author did.
- deleted 5y ago[deleted]
- jffry 5y ago7, b2a3a24530d0e7c15e821d944e34a28178888888458c7d660573ad6e11707df1 - I adopted 2222020 puppies. 8, 8888888808a07e25f69a55118d348c25774e94d21800c6015341d0ff42664e62 - I adopted 6443609616 puppies. 9, 7f0183bc4b5eae3888888888cd55e9b158b6e6f258c7c82f4005cc2ea5ae5a5a - I adopted 4135438531 puppies. 10, 20d394319b224629b96f8888888888b800e2c53b04f3ed6d0dea7e8f96e41c41 - I adopted 1356889176260281396 puppies.
- jffry 5y ago11, 949f43b1118080d2b3b5888888888889ca2e3bee84b2298bbe4f18d6d203ed47 - I adopted 18425680900202321846 puppies.
- davidcollantes 5y agoHow about modifying this one, to use hexadecimal numbers instead?
- davidcollantes 5y agoModified your script to use hexadecimal numbers. Also changed `sha256sum` to use `shasum`, which is what's available on vanilla (not "brewed") macOS. #!/bin/bash COUNT=0 while true; do hex=`printf "%04X\n" $COUNT` SHA=`echo -n "$hex puppies adopted me." | shasum -a 256 | egrep 8888` if [ "$SHA" != "" ] ; then echo "$SHA $hex puppies adopted me." fi COUNT=`expr $COUNT + 1` done