Markus Daniel
16.10.2010Simple Shell-Script to use dict.leo.org in your shell
Just create a new file like “vim leo”.
Insert the following script code:
`#!/bin/sh
t(){
while -n "$1"; do
T=/tmp/$$.html
lynx -source "http://dict.leo.org/?search=$1"|
grep results >$T
w3m -dump $T
rm $T
shift
done
}
-n "$1"&&\
t "$@"||\
while read -ep dict2> W; do
t $W|more
done`
You need lynx and w3m.
Make the file executable (chmod +x leo)
enjoy 😉
e.g. ./leo Übersetzung
I have found this script somewhere in the internet but I don’t know where, so I can not refrence to the original source. I apologize for this.