===================== 
         File: lookup
       Author: dlbrown@iglobal.net, Dave B.
      Release: 1.1 (2/11/98)
Compatibility: PR, PR2 tested.
     Location: http://www.iglobal.net/pub/beos/lookup.zip
  Description: shell script to use the optional items for fun and occasional usefulness
        Notes: quoted from the actual script:
/* v1.1 Drop me in file:/boot/home/config/bin/ to use! Enjoy! The script lookup is a shell script that should work for any bash shell, although I wrote it specifically for the BeOS, because it's cool.*/

/* NOTICE ME Be sure to have the optional/goodies folder on your boot drive. */

/* Installation: */
/* Drag it to file:/boot/home/config/bin/. Open a Terminal. */

/* Use: */
/* Type: "lookup blah" and you will get a huge list with categories of replies. Try it, it's fun! It currently searches for the following: Area Codes by place or number, Country codes, for that foreign email buddy, Dictionary and Thesaurus entries, and Zip Codes by place or number */

/* Advanced Use: */
/* You can add arguments to limit the scope of the search, -area searches area codes only, -cc searches country codes only, -word searches the dictionary and thesaurus only, -zip searches... guess. */

/* Download: */
/* So, enjoy, if you cant get it from beware, you can get it at http://www.iglobal.net/pub/beos/index.html */
for argument in $@; do
	case $1 in
		-area )
			shift
			echo "Area Codes:"
			grep -i $1 /boot/optional/goodies/areacode 
			break ;;

		-cc )
			if [ -e "/boot/optional/goodies/country_codes.txt.gz" ]; then
				gunzip /boot/optional/goodies/country_codes.txt.gz
			fi
			shift
			echo "Country Codes:"
			grep -i $1 /boot/optional/goodies/country_codes.txt 
			break ;;

		-zip )
			shift
			echo "Zip Codes:"
			grep -i $1 /boot/optional/goodies/zipcode.txt 
			break ;;

		-word )
			shift
			echo "Dictionary entries:"
			grep -i $1 /boot/optional/goodies/dictionary
			echo "Thesaurus entries:"
			grep -i $1 /boot/optional/goodies/thesaurus 
			break ;;

		* )
			if [ -e "/boot/optional/goodies/country_codes.txt.gz" ]; then
				gunzip /boot/optional/goodies/country_codes.txt.gz
			fi
			echo "Dictionary entries:"
			grep -i $1 /boot/optional/goodies/dictionary
			echo "Thesaurus entries:"
			grep -i $1 /boot/optional/goodies/thesaurus
			echo "Zip Codes:"
			grep -i $1 /boot/optional/goodies/zipcode.txt
			echo "Country Codes:"
			grep -i $1 /boot/optional/goodies/country_codes.txt 
			echo "Area Codes:"
			grep -i $1 /boot/optional/goodies/areacode ;;
	esac
done