#!/bin/csh -f # plugarchives # ----------------------------------------------------------------------------- # C shell script to show or search PLUG archives # ----------------------------------------------------------------------------- # Usage: Run with -h or --help to see usage. # Assumptions: # Effects: # - None # Notes: # Implementation Notes: # Portability Issues: # Revision History: # $Log$ # ----------------------------------------------------------------------------- if ($#argv == 0 || "$1" == "-h" || "$1" == "--help") then echo "Usage:" echo " $0:t [search terms]" echo "Examples:" echo " $0:t fred@bristle.com " echo " $0:t fred@bristle.com invite" echo " $0:t fred@bristle.com invite 2020" exit 1 endif set browser = "open" # If $1 is a script in the browsers folder, use it as the browser. if ($#argv > 0 && -x "$0:h/browsers/$1") then set browser = $1:q shift endif if ($#argv == 0) then (set echo; $browser http://lists.netisland.net/archives/plug) else echo "Searching for $1:q..." # Note: In Chrome 89.0.4389.90 on 3/24/2021, the #:~:text= part of # this searches for whole word matches only. # Use &filter=0 to get Google to show all results, not just what it # considers to be most relevant. (set echo; $browser "https://google.com/search?q=site:lists.netisland.net/archives/plug/+$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&filter=0#:~:text=$1") endif