Skip to content

Instantly share code, notes, and snippets.

@pestilence669
Created October 8, 2015 07:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save pestilence669/ff615a3c5e9ea8d156bd to your computer and use it in GitHub Desktop.
Save pestilence669/ff615a3c5e9ea8d156bd to your computer and use it in GitHub Desktop.
Show a message using all available fonts for figlet
#!/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