1 read line
< ${1-/dev/tty}
2 echo "Starting with ${#line} characters"
5 for outer
in {a..z
}; do
6 adj
=${orig//[$outer${outer^}]/}
8 while [[ $line != $adj ]]; do
11 eval adj
=\
${adj//$l${l^}}
12 eval adj
=\
${adj//${l^}$l}
15 echo "Letter $outer gives ${#line} characters"
16 if [[ ${#line} -lt $best_len ]]; then
21 echo "Best letter $best_letter gives $best_len"