Translate from english to french

Hi,

I wrote a script to convert a given word from English to French.

But I am not able to figure out what I am missing here.

I am not able to get the translated word

Below is my script:

French=/root/dict/entofr.txt

for i in $*
do
 word="echo $word $i"
done

while:
do
 cat << file1
          1.From English to French
           2. Quit
      file1

read input

case $input in
  1. dict=$French;;
   2. echo"Not successful"
   exit;;
 esac

echo $word| grep -i "^$word|[^a-z,0-9].*$" $dict

if [ $? != 0 ]
  then
    echo "word not in dict"
  else
    echo "word found"
fi
done

I would suggest you to use set -x while running the script, so that you could capture what are you missing really! :slight_smile: