#!/bin/sh
# Increment the serial number in a named file (like soabasefile).
if [ $# = 1 ]; then
	SERFILE=/tmp/nextser.$$
	awk -- '/[0-9]* ; Serial/ { num=$1+1; sub($1,num,$0); print x $0; next}; {print}'\
		 $1 >  $SERFILE
	if [ $? = 0 ]; then
		cp $SERFILE $1
	fi
	rm $SERFILE
fi
