#!/bin/csh -f # dict # ------------------------------------------------------------------------------ # Shell script to look up definitions # ------------------------------------------------------------------------------ # Usage: See Usage section below or run with no arguments to see usage. # Assumptions: # Effects: # - Writes to sdtout and loads browser at definition sites # Notes: # Implementation Notes: # Portability Issues: # Revision History: # $Log$ # ------------------------------------------------------------------------------ if ($#argv == 0) then echo "Usage: $0:t term" exit 1 endif # Launch all, since browser windows are cheap and lightweight. # No need to prompt the user in between. But do them in reverse # order so the most desireable ends up on top. echo "--------------------- Google Ngram" # set pause = $< echo open "https://books.google.com/ngrams/graph?year_start=1950&content=$1:q,$2:q,$3:q,$4:q,$5:q,$6:q,$7:q,$8:q,$9:q,$10:q,$11:q,$12:q,$13:q,$14:q,$15:q,$16:q,$17:q,$18:q,$19:q,$20:q" open "https://books.google.com/ngrams/graph?year_start=1950&content=$1:q,$2:q,$3:q,$4:q,$5:q,$6:q,$7:q,$8:q,$9:q,$10:q,$11:q,$12:q,$13:q,$14:q,$15:q,$16:q,$17:q,$18:q,$19:q,$20:q" echo "--------------------- Google" # set pause = $< echo google $1:q google $1:q echo "--------------------- Google define:" # set pause = $< echo google "define:$1" google "define:$1" echo "--------------------- WikiPedia" # set pause = $< echo wikip $1:q wikip $1:q echo "--------------------- Wiktionary" # set pause = $< echo open "http://en.wiktionary.org/wiki/$1:q" open "http://en.wiktionary.org/wiki/$1:q" echo "--------------------- Miriam-Webster" # set pause = $< # Or can use: http://www.merriam-webster.com/dictionary/$1:q echo open "http://www.m-w.com/dictionary/$1:q" open "http://www.m-w.com/dictionary/$1:q"