Translate from english to french


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Translate from english to french
# 1  
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 09:28 AM.. Reason: Please use code tags for data and code samples, thank you
# 2  
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 for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #990
Difficulty: Medium
UNIX System V is one of the first commercial versions of the Unix operating system and was originally developed by AT&T and first released in 1981.
True or False?

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

Featured Tech Videos