When I'm reading a book there is a lot of new words that I look up in a dictionary, and it would be great to create a list of the words that I'm learning, so I do both looking up and making that list really using this script I wrote.
I use the wordnet command line utility (wn) for looking up words in English, alternatively you may use sdcv that is another useful command line utility, you only have to modify the code between parenthesis in line 5:
while true; do
read -p "Enter a word " WORD
a=$(wn "$WORD" -over)
if [ ! -z "$a" ]; then
echo $WORD >> words
This code verifies that the word exist in order to add the word in the list, when the word do not exist is returned a blank output.