-
-
Save thomedes/c8c3cde1f8cf5228db998f0dc3c15c18 to your computer and use it in GitHub Desktop.
Show a message using all available fonts for figlet
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
#!/bin/bash | |
# vim: set ts=4 sw=4 noet fileencoding=utf-8: | |
fontDir=`figlet -I2` | |
if [[ $# -eq 0 ]]; then | |
echo "usage: $(basename $0) [message] -- print given message for every available font in figlet" | |
exit 0 | |
fi | |
for fontType in `figlet -I5`; do | |
ext=${fontType%[0-9]} # flf2 = .flf, tlf2 = .tlf | |
for font in `ls $fontDir/*.$ext 2>/dev/null`; do | |
printf ':%.s' {1..80} # line separators | |
echo -e "\n$(basename ${font%.$ext})\n" | |
figlet -f $font $@ | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment