[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Aspell-user] calling aspell through a pipe
From: |
Dormont, Dan \(Corporate\) |
Subject: |
[Aspell-user] calling aspell through a pipe |
Date: |
Tue, 7 Dec 2004 14:43:58 -0500 |
I got a good suggestion on calling aspell through a pipe with a text file.
Reprinted with permission of the author:
> From: address@hidden [mailto:address@hidden
> Sent: Tuesday, December 07, 2004 1:02 PM
> To: Dormont, Dan (Corporate)
> Subject: calling aspell from Java
>
>
> While searching the web I saw your thread on aspell-user and since the thread
> was so recent, I just wanted to let you know about a solution I came up with
> that seems to be working.
>
> I had been struggling with trying to call aspell from a servlet with the
> following command:
>
> "/usr/local/bin/aspell -a --lang=en_US --encoding=utf-8 <
> /path/to/my/file/tempfile 2>&1"
>
> Of course I ran into the same problem described in the thread, and found this
> article somewhat helpful:
>
> http://www.mountainstorm.com/publications/javazine.html
>
> According to that article, redirection should be possible. However, even
> trying that approach, I still couldn't get the redirection to work so here's
> what I did. I wrote a shell script that takes the tempfile as a variable,
> called it aspellScript.sh, containing the following:
>
> /usr/local/bin/aspell -a --lang=en_US --encoding=utf-8 < $1 2>&1
>
> So instead of calling aspell and specifiying all the options from the Java
> code, I simply call the shell script and pass the tempfile name as an
> argument
> to populate the $1 variable in the script. The string I now pass to the exec
> method is just:
>
> "/path/to/my/script/aspellScript.sh " + tempfile
>
> It works fine, at least from my command line test client. I'm sure the same
> can be done on windows. Not elegant, but it gets the job done. Hope that
> helps.
>
>
>
> thanks,
>
> Liz
> address@hidden
Daniel Dormont
____________________________________
SupportCentral - GE Corporate
900 Chapel Street, 7th. Floor
New Haven, CT 06510
Ph:(203) 787-7028 Dial-Comm 8*233-7028
E-Mail : address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Aspell-user] calling aspell through a pipe,
Dormont, Dan \(Corporate\) <=