#!/bin/bash list=./goodfigletfonts for font in $(<$list); do info="$(head -1 /usr/share/figlet/fonts/$font)" info="${info#* }" info="${info%% *}" echo -n "$font " >> "$list-$info" done