Author Topic: [SOLVED] SteaK Dictionary Program  (Read 3369 times)

Pita

  • Vectorian
  • ****
  • Posts: 1349
[SOLVED] SteaK Dictionary Program
« on: September 03, 2015, 01:30:45 am »
I had very bad luck. My SATA Western Digital HD, from which I run Linux suddenly
could not be read any longer by the BIOS. This HD was onlty 3 years old. All data lost.

Until I have the money to buy a new HD I am using now my old IDE drive on which luckily
I had quite a few data intact and others I am trying to install again.

One program is an English-German dictionary called "steak" run from a terminal which
refuses now to open.

The command from a terminal is:
Code: [Select]
steak word
or for German to English with a -d flag.

Now I get this error:
Code: [Select]
$ steak me
sed: file /home/user/bin/Steak/iso2txt line 3: unterminated `s' command
sed: file /home/user/bin/Steak/iso2txt line 3: unterminated `s' command

Please always enter a word when calling this program.
and program ends.

cat iso2txt
Code: [Select]
#!/usr/bin/sed -f

s/ /ae/g
s/ /Ae/g
s/ /oe/g
s/ /Oe/g
s/ /ue/g
s/ /Ue/g
s/ /ss/g

Could someone be so kind and tell me what to do with this
error message. I am using this program a lot especially since it is
not dependent to be online.

« Last Edit: September 07, 2015, 09:19:44 pm by Pita »

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3499
Re: SteaK Dictionary Program
« Reply #1 on: September 03, 2015, 04:38:28 am »
Looks like that program requires a very specific version of gnu sed.

I couldnt tell you which one though.  You have actally posted about this before.  See here http://forum.vectorlinux.com/index.php?topic=14164.0

To my inexperienced eye, it looks as if the sed syntax is indeed wrong, but there is also this other post
http://www.bsdforen.de/threads/steak-xsteak-ksteak-probleme-und-maintainersuche.26228/

This indicates there should be some unicode characters in that sed script.  If you have not set your locale to support unicode, then that may be something to try
« Last Edit: September 03, 2015, 04:43:43 am by M0E-lnx »

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4495
Re: SteaK Dictionary Program
« Reply #2 on: September 03, 2015, 05:49:42 am »
Try enclosing the sed statements in iso2txt with single quotes, as in:
's/ /ae/g'

Pita

  • Vectorian
  • ****
  • Posts: 1349
Re: SteaK Dictionary Program
« Reply #3 on: September 03, 2015, 08:08:29 pm »
Looks like that program requires a very specific version of gnu sed.

I couldnt tell you which one though.  You have actally posted about this before.  See here http://forum.vectorlinux.com/index.php?topic=14164.0


Thanks!

Looks like age is creeping-up. ;)

roarde

  • Vectorian
  • ****
  • Posts: 787
  • it's enough
Re: SteaK Dictionary Program
« Reply #4 on: September 03, 2015, 08:23:50 pm »
I'm still thinking setting the language would work on its own. Newer versions of sed are more lang-aware and generally better for multilingual use if the system is set up properly.

What's the output of
echo $LANG $LANG_ALL

It's fine if you only get one item returned, which would be "LANG". "LANG_ALL" shouldn't need to be set, but there are some programs that *think* they need it.
Robert

Pita

  • Vectorian
  • ****
  • Posts: 1349
Re: SteaK Dictionary Program
« Reply #5 on: September 04, 2015, 09:04:00 pm »
I have tried different LANG settings and it seems it makes no difference.

HOWEVER, I am a step closer to make steak work.

I have a user called "guest". If I login to guest steak is working. :D
The files for steak in /home/guest/bin/Steak are the same as in my user home.

In ~/user-me starting steak I do not get any longer the  error
Code: [Select]
sed: file /home/user/bin/Steak/iso2txt line 3: unterminated `s' command
after changing in iso2txt to the correct German Umlaute.
Starting steak now I get:
Quote
The word "word" could not be found.
No word with the Praefix "word" was found
end of steak.

Now the big question: which file(s) in /home/user-me is either missing or not correct
or should not be there to prevent steak from opening unlike in /home/guest?



« Last Edit: September 04, 2015, 09:09:00 pm by Pita »

Pita

  • Vectorian
  • ****
  • Posts: 1349
Re: SteaK Dictionary Program
« Reply #6 on: September 05, 2015, 12:32:01 am »
Further fumbling.

As su I cd to /home/guest/bin/Steak. Typed "steak word" and to my surprise steak opened.
Back to cd /root.  Typed "steak word" and to my surprise steak opened. ;D

Back to user ~. Typed "sudo steak word" and to my surprise steak opened. ;D :D :D

So it has something to do now with permission in my home box. No sudo no open.
Not so in "guest"  ???



Pita

  • Vectorian
  • ****
  • Posts: 1349
Re: SteaK Dictionary Program
« Reply #7 on: September 06, 2015, 04:35:03 am »
Sigh! Finally made it. :D :D :D.
Code: [Select]
$ steak me
Quote
English     ->     Deutsch
  1 )  me :== mich, mir
  2 )  me :== mir
  3 )  me :== mir; mich
Moechten Sie das Wort in einem Kontext sehen (j/n)?

Now a night cap. ;) Tomorrow details how.