new-words
view misc/de @ 68:846240941452
added -C key: compress to lines; fixed bug with #90-line
author | Igor Chubin <igor@chub.in> |
---|---|
date | Sun Sep 23 16:07:29 2012 +0300 (2012-09-23) |
parents | |
children |
line source
1 #!/bin/sh
3 MY_NAME=$(echo $0 | sed s@.*/@@)
4 case "$MY_NAME" in
5 ru-de)
6 DICTNAME="Universal (Ru-Ge)"
7 ;;
8 en)
9 DICTNAME="LingvoUniversal (En-Ru)"
10 ;;
11 fr)
12 DICTNAME="Universal (Fr-Ru)"
13 ;;
14 *)
15 DICTNAME='Universal (Ge-Ru)'
16 ;;
17 esac
19 _dict()
20 {
21 if [ "$FULL" = YES ]
22 then
23 sdcv -n -u "$DICTNAME" "$1" | fgrep -v .wav
24 else
25 sdcv -n -u "$DICTNAME" "$1" | grep -v — | fgrep -v .wav
26 fi
27 }
29 (
30 myname="`echo $0 | sed s@.*/@@`"
31 _dict "$@"
32 if [ -e "$ORIGINAL_TEXT" ]
33 then
34 echo . . . . . . . . . . . . . . . . . . . . . . . . . ; echo
35 if [ -z "$GREP_SENTENCES" ]
36 then
37 grep-sentences "$*" "$ORIGINAL_TEXT"
38 else
39 $GREP_SENTENCES "$@" | head -15
40 fi
41 else
42 echo `date +%s` "$@" >> ~/Langs/Deutsch/${MY_NAME}.log
43 fi
44 )