#!/bin/sh
# checkspelling - Contrle l'orthographe d'un mot.

spell="ispell -l -d french"   # si vous avez install ispell
                              #   et le dictionnaire franais
                              # sinon, utilisez un quivalent

if [ $# -lt 1 ]; then
  echo "Syntaxe: $0 mot ou mots" >&2;  
  exit 1 
fi

for word 
do 
  if [ -z $(echo $word | $spell) ] ; then
    echo "$word:                      bien crit." 
  else  
    echo "$word:                      mal crit." 
  fi 
done

exit 0
