#!/bin/csh
# /home/www/htdocs/ggpages/DEM/grepsed, DEM 20apr96
# "grep" out particular words of interest, instead of whole lines.
# To find hrefs that need editing when moving Webserver files from wheat to
#   jouy.

# Invoke with "grepsed <string> <filenames>"
# Example: grepsed probe.nalusda.gov new*html > grepsed.out

grep $argv[1] $argv[2-]	\
# Output only from the test string up to the end of the word.\
| sed -e "s/.*\($argv[1][^ ]*\).*/\1/g"		\
| sort						\
| uniq						

