Sponsored Content
Top Forums Shell Programming and Scripting Translate from english to french Post 302675311 by pinky7630 on Sunday 22nd of July 2012 09:59:44 PM
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
 

6 More Discussions You Might Find Interesting

1. 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

2. 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

3. UNIX for Dummies Questions & Answers

translate to normal english

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

4. 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

5. 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

6. 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
american-english-insane(5)					   Users' Manual					american-english-insane(5)

NAME
american-english-insane - a list of English words DESCRIPTION
/usr/share/dict/american-english-insane is an ASCII file which contains an alphabetic list of words, one per line. FILES
There may be any number of word lists in /usr/share/dict/. /etc/dictionaries-common/words is a symbolic link to the currently-chosen /usr/share/dict/<language> file. /usr/share/dict/words is a symbolic link to /etc/dictionaries-common/words, and is the name by which other software should refer to the system word list. See select-default-wordlist(8) for more information, and/or to change the currently- chosen word list. The directory /usr/share/dict can contain word lists for many languages, with name of the language in English, e.g., /usr/share/dict/french and /usr/share/dict/danish contain respectively lists of French and Danish words if they exist. Such lists should be coded using the ISO 8859-1 character set encoding. SEE ALSO
ispell(1), select-default-wordlist(8), and the Filesystem Hierarchy Standard. HISTORY
The words lists are not specific, and may be generated from any number of sources. The system word list used to be /usr/dict/words. For compatibility, software should check that location if /usr/share/dict/words does not exist. AUTHOR
Word lists are collected and maintained by various authors. The Debian English word lists are built from the SCOWL (Spell- Checker Ori- ented Word Lists) package, whose upstream editor is Kevin Atkinson <kevina@users.sourceforge.net>. Debian 16 June 2003 american-english-insane(5)
All times are GMT -4. The time now is 05:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy