Skip to content

Commit

Permalink
donuts: another fix for the Greek alphabeta after the latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
c00kiemon5ter committed Dec 4, 2012
1 parent d483b4a commit 54b14a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion donuts
Expand Up @@ -200,7 +200,7 @@ case "${cmd}" in
;;
r|rhyme)
while read -r word; do
word="$(tr -cd "*ςάέήίόύώΆΈΉΊΌΎΏ[α-ωΑ-Ω][:alnum:]" <<< "$word")"
word="$(tr -cd "*ςστάέήίόύώΆΈΉΊΌΎΏ[α-ωΑ-Ω][:alnum:]" <<< "$word")"
r=( $(grep -h "^${word//[*]/[^/]*}$" /usr/share/dict/* /usr/share/hunspell/*.dic ) )
(( !$? )) && mesg="$(sed "s/${word//[*]/[*]}/${r[RANDOM%${#r[@]}]}/" <<< "$mesg")"
done < <(awk '{ for (i=1; i<=NF; i++) if ($i ~ /[*]/) print $i }' <<< "${mesg}")
Expand Down

0 comments on commit 54b14a4

Please sign in to comment.