new-words
changeset 59:7a7a88277c08
experimental script oneliners.sh moved to misc/
author | Igor Chubin <igor@chub.in> |
---|---|
date | Thu Nov 03 16:10:58 2011 +0100 (2011-11-03) |
parents | 12abeed4d89f |
children | 3682038403ad |
files | misc/oneliners.sh oneliners.sh |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/misc/oneliners.sh Thu Nov 03 16:10:58 2011 +0100 1.3 @@ -0,0 +1,11 @@ 1.4 +temp=/tmp/oneliner$$ 1.5 +while read l 1.6 +do 1.7 + 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 1.8 + if [ `wc -l $temp | awk '{print $1}'` = 1 ] 1.9 + then 1.10 + echo -n $l 1.11 + cat $temp 1.12 + fi 1.13 +done 1.14 +
2.1 --- a/oneliners.sh Thu Nov 03 16:08:46 2011 +0100 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,11 +0,0 @@ 2.4 -temp=/tmp/oneliner$$ 2.5 -while read l 2.6 -do 2.7 - 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 2.8 - if [ `wc -l $temp | awk '{print $1}'` = 1 ] 2.9 - then 2.10 - echo -n $l 2.11 - cat $temp 2.12 - fi 2.13 -done 2.14 -