#!/bin/ksh

# used to apply the sed commands in file arg1 to the file named in arg2
# make multiple passes if pattern file is greater than 100 line limit

rm -f /tmp/sedtmp*

split -l 95 $1 /tmp/sedtmp$$

for sedfile in /tmp/sedtmp*
do
    sed -f $sedfile $2 > /tmp/--temp--.---
    mv /tmp/--temp--.--- $2
done

rm -f /tmp/sedtmp*

