Skip to content

Commit aac6a6a

Browse files
authored
Optimized and won't make ugly mistakes with apostrophes
1 parent dc6f046 commit aac6a6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sha.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
@willie.module.example('.sha', 'sha')
77
def spacestate(bot, trigger):
88
"""Gives you a random SHA2021 slogan suggestion"""
9-
txt = "echo \"$(grep \"^s\" /usr/share/dict/cracklib-small | shuf -n1) $(grep \"^hack\" /usr/share/dict/cracklib-small | shuf -n1) $(grep \"^a\" /usr/share/dict/cracklib-small | shuf -n1) 2021\""
10-
bot.say(os.popen(txt).read().title())
11-
9+
txt = "for v in s h a; do w=$(grep \"^$v\" /usr/share/dict/cracklib-small | shuf -n1); echo -n \"${w^^${w:0:1}} \"; done ; echo 2021"
10+
bot.say(os.popen(txt).read())
11+

0 commit comments

Comments
 (0)