new-words
annotate oneliners.sh @ 26:4a10c0f4510c
apostrophe support, some improvements in speed, two and three words combination support
author | Igor Chubin <igor@chub.in> |
---|---|
date | Fri May 21 01:02:21 2010 +0300 (2010-05-21) |
parents | |
children |
rev | line source |
---|---|
igor@20 | 1 temp=/tmp/oneliner$$ |
igor@20 | 2 while read l |
igor@20 | 3 do |
igor@20 | 4 dict -h dictd.xdsl.by -d mueller24 "$l" 2> /dev/null | perl -n -e 'print if ($y and not /^\s*$/) ; $y=1 if /'$l'/;' | grep -v _Syn | grep -v _Ant > $temp |
igor@20 | 5 if [ `wc -l $temp | awk '{print $1}'` = 1 ] |
igor@20 | 6 then |
igor@20 | 7 echo -n $l |
igor@20 | 8 cat $temp |
igor@20 | 9 fi |
igor@20 | 10 done |
igor@20 | 11 |