#! /bin/bash
# [[motCroise.sh]]  find a crossword
# Required:  dico () le-dico-de-rene-cougnenc
#
# Author:
# Fred Radeff, radeff@akademia.ch, radeff.red
# History
#  16 janvier 2007  : FR, created
# No Copyright, steal this!
#########
echo "Trouve le mot croisé"
echo "Entrer les lettres, mettre des wildard *:"
echo "Exemple: pour t*rade* on aura:
      Taradeau                       
      Tardigrade
      ..."
read mot
dico $mot > test
echo "Entrer le nombre de lettres:"
read nblettres
#echo $nblettres
#cat test
rm test1
cat test | while read i
do
echo $i | gawk '{print $1":" length($1)}' >> test1
done
#mots
echo "egrep ':"$nblettres"$' test1" > test3
#source "egrep ':$nblettres$' test1"
echo "Nombre de mots trouvés:"
. test3  | wc -l
echo "----"
. test3
  • info/motcroise.sh.txt
  • Dernière modification: 2018/07/18 09:46
  • par radeff