Created
September 1, 2023 00:00
-
-
Save wlonkly/348910a0a40fc63dcca2250c758b0a34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a8e () { LEN=$(( $(echo -n $1 | wc -c) - 2)); echo $1 | sed "s/^\(.\).*\(.\)$/\1$LEN\2/"; } | |
e9e () { LEN=$(echo $1 | sed 's/^.\(.*\).$/\1/'); GREP=$(echo $1 | sed "s/^\(.\).*\(.\)$/^\1.{$LEN}\2$/"); grep -E "$GREP" /usr/share/dict/words; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment