#!/bin/sh
# strip out string from given file
#
# $1 is file to strip
#
# string to compare:
# (don't put special characters in it since those could cause quoting problems)
IGNORE=Z4D

# note above is hard-coded.
# probably leave it that way or make environment variable
# (but not command-line option; o.w., jrv would need to deal with it)

# temp file to strip
file=zjrvStRiP

mv $1 $file

# did file exist?
if [ $? -ne 0 ]; then
    echo "$1 does not exist"
    exit 1
fi

grep -v $IGNORE $file > $1

# could remove $file, but will keep for debugging this script.
