
######################################################################
#  Name: 	povsubst
#  Author:	Hartmut Keller
#  Last Change: 8. Apr 94
#  AERO:	V1.5
#
#  Abstract:
#  ---------
#  This is a bourne shell script which allows to change selected 
#  definitions of POV-Ray scene files created by AERO.
######################################################################

if [ $# -ne 3 ]; then
  echo "Usage:   $0 <objectnumber> <search-expression> <replace-expression>"
  echo "Example: $0 3 aerobox myshape"
  echo "         this substitutes the shape identifier of object No. 3 in"
  echo "         all .pov-files in the current directoy."
  exit
fi

for i in *.pov
do
  sed "/^\/\* O#$1 \*\/$/,/^$/ s/$2/$3/" $i >$i.new
done
