Translate from english to french


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Translate from english to french
# 1  
Old 07-22-2012
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:
Code:
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


Last edited by Franklin52; 07-24-2012 at 08:28 AM.. Reason: Please use code tags for data and code samples, thank you
# 2  
Old 07-22-2012
I would suggest you to use set -x while running the script, so that you could capture what are you missing really! Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

French characters in postfix/sendmail

Hello again, How can I send emails via postfix with special characters like "à" via postfix. When I'm paste-ing the special character inside a editor (nano) it shows like this --> � ... any tips? (1 Reply)
Discussion started by: galford
1 Replies

2. Shell Programming and Scripting

Can someone please help me translate this UNIX script to English?

Hi guys, I'm trying to create a DataStage job and I'm basing it off an existing similar project. The 'Input' value of the job is: (where "/DATA/CSV_FILES" is where all the files were located) My understanding is that for each CSV, it added the 'filename' as Column A. And then it... (5 Replies)
Discussion started by: thedunnyman
5 Replies

3. Shell Programming and Scripting

how to handle french char. in SunOS

Hi Friends, Need help regarding how to handle french char. in SunOS. I have to remove blank line from 100 files ( which also has some french char.), so I put all those file in unix (SunOS) by using filezilla and by using sed command I achived this, and I again get all the file back through... (2 Replies)
Discussion started by: forroughuse
2 Replies

4. UNIX for Dummies Questions & Answers

translate to normal english

lnode * head = temp; (1 Reply)
Discussion started by: rickym2626
1 Replies

5. HP-UX

Problems with French Characters

I am having a problem with two OSes. One is running windows 2003 and sending XML to a second system running Unix (HP-UX 11i v1). Windows sends XML to the UNIX system fine but then the UNIX system reads the buffer file and turns the french characters into the following: é Ú É ╔ Î ... (3 Replies)
Discussion started by: Redfin
3 Replies

6. Shell Programming and Scripting

Replacing French special characters

Hi, I have tonnes of .txt files that are written in French. I need to replace the French special characters, however, with English equivalents (e.g. é -> e and ç -> c). I have tried this --- #!/bin/bash # Convert French characters to normal characters # Treat each of the files exec... (4 Replies)
Discussion started by: BlueberryPickle
4 Replies
Login or Register to Ask a Question